Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1012629 // ai_splitCompoundWord2

JavaX fragment (include)

static LL<S> ai_splitCompoundWord2(S s) {
  new LL<S> out;
  for (int i = 1; i < l(s)-1; i++) {
    S a = substring(s, 0, i), b;
    if (ai_isWord(a) && ai_isWord(b = substring(s, i)))
      out.add(ll(a, b));
  }
  ret out;
}

Author comment

Began life as a copy of #1012627

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1012629
Snippet name: ai_splitCompoundWord2
Eternal ID of this version: #1012629/1
Text MD5: eaf21209ac9139493e59346b53dff38d
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-08 17:31:57
Source code size: 234 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 396 / 447
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)