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

4
LINES

< > BotCompany Repo | #1014683 // linesPreservingTrailingNewLine

JavaX fragment (include)

static S linesPreservingTrailingNewLine(S original, L<S> lines) {
  S s = lines(lines);
  ret endsWith(original, "\n") ? s : dropSuffix("\n", s);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014683
Snippet name: linesPreservingTrailingNewLine
Eternal ID of this version: #1014683/1
Text MD5: 1fa5b03d7a005c81e761f9d3c59585e4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-30 00:29:13
Source code size: 150 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 369 / 401
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)