static L<L<S>> splitListBy(L<S> l, S sep) { int i = 0; new L<L<S>> x; while (i < l(l)) { int j = indexOf(l, sep, i); if (j < 0) j = l(l); if (j > i) x.add(l.subList(i, j)); i = j+1; } ret x; }
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: | #1002147 |
Snippet name: | splitListBy |
Eternal ID of this version: | #1002147/1 |
Text MD5: | 836aa5953e9153c92cb724bdf45238d4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-22 00:01:18 |
Source code size: | 235 bytes / 12 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 678 / 925 |
Referenced in: | [show references] |