Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1005051 // lineStartIndexes

JavaX fragment (include)

static L<Int> lineStartIndexes(S s) {
  new L<Int> l;
  l.add(0);
  int i = 0;
  while ((i = indexOf(s, '\n', i)) >= 0)
    l.add(++i);
  ret l;
}

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: 465 / 445
Referenced in: [show references]