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

13
LINES

< > BotCompany Repo | #1005258 // splitAtArrow - javaTok and split at "=>"

JavaX fragment (include)

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

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, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005258
Snippet name: splitAtArrow - javaTok and split at "=>"
Eternal ID of this version: #1005258/1
Text MD5: f00deee032c86dcef836c4e7860e4059
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-27 21:58:17
Source code size: 291 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 647 / 658
Referenced in: [show references]