1 | static L<S> splitByJavaToken(S s, S splitToken) {
|
2 | L<S> tok = javaTok(s); |
3 | new L<S> l; |
4 | int i = 1; |
5 | while (i < l(tok)) {
|
6 | int j = smartIndexOf(tok, splitToken, i); |
7 | l.add(join(subList(tok, i, j-1))); |
8 | i = j+2; |
9 | } |
10 | ret l; |
11 | } |
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: | #1002271 |
| Snippet name: | splitByJavaToken - unclear semantics with double separators, separator at beginning/end |
| Eternal ID of this version: | #1002271/5 |
| Text MD5: | 56593b2339d0ec2499720f89220cab3f |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-06-21 19:16:26 |
| Source code size: | 247 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 994 / 1447 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |