1 | static L<S> tok_splitAtSlash(S s) { |
2 | ret tok_splitAtSlash(javaTok(s)); |
3 | } |
4 | |
5 | static L<S> tok_splitAtSlash(L<S> tok) { |
6 | new L<S> l; |
7 | int i = 0; |
8 | while (i < l(tok)) { |
9 | if (i >= l(tok)) break; |
10 | int j = indexOf(tok, "/", i); |
11 | if (j < 0) j = l(tok); |
12 | l.add(trimJoin(tok.subList(i, j))); |
13 | i = j+1; |
14 | } |
15 | ret l; |
16 | } |
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: | #1012882 |
Snippet name: | tok_splitAtSlash - javaTok and split at "/" (and trim) |
Eternal ID of this version: | #1012882/1 |
Text MD5: | 7962565a9ab0cc0875aa1f4b28c57555 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-15 00:13:54 |
Source code size: | 337 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 344 / 394 |
Referenced in: | [show references] |