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

11
LINES

< > BotCompany Repo | #1013105 // tok_splitAtSpacedDashes_old - split at " - " (allowing newlines instead of spaces too)

JavaX fragment (include)

1  
static L<S> tok_splitAtSpacedDashes_old(S s) {
2  
  L<S> tok = javaTok(s);
3  
  new L<S> l;
4  
  int i = 1;
5  
  while (i < l(tok)) {
6  
    int j = smartIndexOfSpacedDash(tok, i);
7  
    l.add(trimJoinSubList(tok, i, j));
8  
    i = j+2;
9  
  }
10  
  ret l;
11  
}

Author comment

Began life as a copy of #1002271

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013105
Snippet name: tok_splitAtSpacedDashes_old - split at " - " (allowing newlines instead of spaces too)
Eternal ID of this version: #1013105/8
Text MD5: 3a398a80e5c3d4dde834239b0e6a6923
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-11 17:09:17
Source code size: 242 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 371 / 396
Version history: 7 change(s)
Referenced in: [show references]