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

5
LINES

< > BotCompany Repo | #1026310 // dropLeadingNewLine

JavaX fragment (include)

1  
sS dropLeadingNewLine(S s) {
2  
  if (startsWith(s, "\r\n")) ret substring(s, 2);
3  
  if (startsWith(s, "\n")) ret substring(s, 1);
4  
  ret s;
5  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1026310
Snippet name: dropLeadingNewLine
Eternal ID of this version: #1026310/1
Text MD5: f6ffa89fabd1f9aa08476196d9f3ee27
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-15 18:34:45
Source code size: 141 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 201 / 244
Referenced in: [show references]