static L<S> splitAtSimpleArrow(S s) {
ret splitAtSimpleArrow(javaTok(s));
}
static L<S> splitAtSimpleArrow(L<S> tok) {
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(trimJoin(tok.subList(i, j)));
i = j+3;
}
ret l;
}Began life as a copy of #1005258
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: | #1008581 |
| Snippet name: | splitAtSimpleArrow - javaTok and split at "->" |
| Eternal ID of this version: | #1008581/5 |
| Text MD5: | 2f6545dd97fd23db10376617d5ebc045 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-14 05:01:02 |
| Source code size: | 363 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1044 / 1060 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |