sS dropLeadingNewLines(S s) { int i = 0; while true { if (substringAtIs(s, i, "\r\n")) i += 2; else if (substringAtIs(s, i, "\n")) i++; else break; } ret substring(s, i); }
Began life as a copy of #1026310
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031224 |
Snippet name: | dropLeadingNewLines - does not drop them if they contain spaces |
Eternal ID of this version: | #1031224/2 |
Text MD5: | 94789837d3e14050cffa50fb69b19d2d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-21 18:36:55 |
Source code size: | 221 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 168 / 199 |
Version history: | 1 change(s) |
Referenced in: | [show references] |