1 | static L<S> extractMarkedLines(S text, BitSet marking) { |
2 | new L<S> l; |
3 | L<Int> indexes = lineStartIndexes(text); |
4 | for (int i : indexes) { |
5 | int j = smartIndexOf(text, "\n", i); |
6 | if (anyBitSetInRange(marking, i, j+1)) |
7 | l.add(substring(text, i, j)); |
8 | } |
9 | ret l; |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005054 |
Snippet name: | extractMarkedLines |
Eternal ID of this version: | #1005054/1 |
Text MD5: | f17189efc9ae664f6d651eaf35514568 |
Author: | stefan |
Category: | javax / text analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-10-03 20:50:53 |
Source code size: | 283 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 558 / 558 |
Referenced in: | [show references] |