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)

static L<S> splitAtArrow(S s) {
  L<S> tok = javaTok(s);
  new L<S> l;
  int i = 0;
  while (i < l(tok)) {
    int j = indexOfSubList(tok, ll("=", "", ">"), i);
    if (i >= l(tok)) break;
    if (j < 0) j = l(tok);
    l.add(join(tok.subList(i, j)));
    i = j+3;
  }
  ret l;
}

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: 645 / 656
Referenced in: [show references]