1 | static L<Int> lineStartIndexes(S s) { |
2 | new L<Int> l; |
3 | l.add(0); |
4 | int i = 0; |
5 | while ((i = indexOf(s, '\n', i)) >= 0) |
6 | l.add(++i); |
7 | ret l; |
8 | } |
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: | #1005051 |
Snippet name: | lineStartIndexes |
Eternal ID of this version: | #1005051/1 |
Text MD5: | b7b02c2ae37d64a86664150f69c209fa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-10-03 20:37:25 |
Source code size: | 153 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 546 / 532 |
Referenced in: | [show references] |