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

16
LINES

< > BotCompany Repo | #1014235 // splitAtDoubleLeftArrow - javaTok and split at "<=" (and trim)

JavaX fragment (include)

1  
static L<S> splitAtDoubleLeftArrow(S s) {
2  
  ret splitAtDoubleLeftArrow(javaTok(s));
3  
}
4  
5  
static L<S> splitAtDoubleLeftArrow(L<S> tok) {
6  
  new L<S> l;
7  
  int i = 0;
8  
  while (i < l(tok)) {
9  
    int j = indexOfSubList(tok, ll("<", "", "="), i);
10  
    if (i >= l(tok)) break;
11  
    if (j < 0) j = l(tok);
12  
    l.add(trimJoin(tok.subList(i, j)));
13  
    i = j+3;
14  
  }
15  
  ret l;
16  
}

Author comment

Began life as a copy of #1011989

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: #1014235
Snippet name: splitAtDoubleLeftArrow - javaTok and split at "<=" (and trim)
Eternal ID of this version: #1014235/3
Text MD5: 9ba27ab223fbd3a7ddc7c670b888e3c6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-17 02:11:24
Source code size: 375 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 384 / 409
Version history: 2 change(s)
Referenced in: [show references]