static L<Bits> splitBitsAtElement(L<Bits> l, Bits splitter) { l = unnull(l); new L<Bits> parts; int i = 0; while true { int j = indexOf(l, splitter, i); if (j < 0) { parts.add(joinBits(subList(l, i))); break; } parts.add(joinBits(subList(l, i, j))); i = j+1; while (i < l(l) && eq(l.get(i), splitter)) ++i; } ret parts; }
Began life as a copy of #1006143
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: | #1006144 |
Snippet name: | splitBitsAtElement |
Eternal ID of this version: | #1006144/1 |
Text MD5: | 7ea1fb3ae977e8c74a6df37eeafb627f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-21 16:33:10 |
Source code size: | 384 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 536 / 536 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |