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

5
LINES

< > BotCompany Repo | #1016574 // beforeLineBreak

JavaX fragment (include)

static S beforeLineBreak(S s) {
  int i = smartIndexOf(s, '\n');
  if (i > 0 && s.charAt(i-1) == '\r') --i;
  ret substring(s, 0, i);
}

Author comment

Began life as a copy of #1016573

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016574
Snippet name: beforeLineBreak
Eternal ID of this version: #1016574/2
Text MD5: dbd6459927e5cafa013339150063e310
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-24 00:35:40
Source code size: 139 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 377 / 421
Version history: 1 change(s)
Referenced in: [show references]