1 | static L<S> splitAfterChars_trim(S chars, S s) { |
2 | new L<S> out; |
3 | L<int> l = indexesOfCharacters(s, chars); |
4 | addFirstUnlessThere(l, 0); |
5 | addUnlessThere(l, l(s)); |
6 | for (int i = 0; i+1 < l(l); i++) |
7 | addIfNempty(out, trim(substring(s, l.get(i)+1, l.get(i+1)))); |
8 | ret out; |
9 | } |
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: | #1013719 |
Snippet name: | splitAfterChars_trim |
Eternal ID of this version: | #1013719/4 |
Text MD5: | a4c7da8d3d648c6dcf318f5f1b28c307 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-01-28 03:05:09 |
Source code size: | 286 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 330 / 374 |
Version history: | 3 change(s) |
Referenced in: | [show references] |