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).

static LS toLines_nOnly_reversible(S s) {
  new LS lines;
  if (s == null) ret lines;
  int start = 0, n = s.length();
  if (n != 0) while true {
    int i = smartIndexOf(s, '\n', start);
    lines.add(s.substring(start, i));
    if (i == n) break;
    start = i+1;
  }
  ret lines;
}

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: 263 / 376
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)