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

12
LINES

< > BotCompany Repo | #1028222 // toLines_nOnly_reversible

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2518L/16K).

1  
static LS toLines_nOnly_reversible(S s) {
2  
  new LS lines;
3  
  if (s == null) ret lines;
4  
  int start = 0, n = s.length();
5  
  if (n != 0) while true {
6  
    int i = smartIndexOf(s, '\n', start);
7  
    lines.add(s.substring(start, i));
8  
    if (i == n) break;
9  
    start = i+1;
10  
  }
11  
  ret lines;
12  
}

Author comment

Began life as a copy of #1001950

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028222
Snippet name: toLines_nOnly_reversible
Eternal ID of this version: #1028222/7
Text MD5: 90e51ba23ed3b3f2acae5be17320f46e
Transpilation MD5: a4fcf367a160165d3c77e52ffabba000
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-27 13:28:48
Source code size: 295 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 283
Version history: 6 change(s)
Referenced in: [show references]