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

12
LINES

< > BotCompany Repo | #1002398 // fromLines (function) - appends \n after last line too

JavaX fragment (include)

// usually L<S>
static String fromLines(Iterable lines) {
  new StringBuilder buf;
  if (lines != null)
    for (O line : lines)
      buf.append(str(line)).append('\n');
  return buf.toString();
}

static String fromLines(S... lines) {
  ret fromLines(asList(lines));
}

Author comment

Began life as a copy of #2000329

download  show line numbers  debug dex  old transpilations   

Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1002398
Snippet name: fromLines (function) - appends \n after last line too
Eternal ID of this version: #1002398/4
Text MD5: 2a4c4b92f71ddf6b061957dec10c5f76
Author: stefan
Category: javac
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-11 13:58:43
Source code size: 281 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 629 / 3138
Version history: 3 change(s)
Referenced in: [show references]