1 | static L<Bits> splitBitsAtElement(L<Bits> l, Bits splitter) { |
2 | l = unnull(l); |
3 | new L<Bits> parts; |
4 | int i = 0; |
5 | while true { |
6 | int j = indexOf(l, splitter, i); |
7 | if (j < 0) { |
8 | parts.add(joinBits(subList(l, i))); |
9 | break; |
10 | } |
11 | parts.add(joinBits(subList(l, i, j))); |
12 | i = j+1; |
13 | while (i < l(l) && eq(l.get(i), splitter)) ++i; |
14 | } |
15 | ret parts; |
16 | } |
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: | 537 / 537 |
Referenced in: | [show references] |