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

11
LINES

< > BotCompany Repo | #1017949 // rtrim_fromLines - no \n after last line

JavaX fragment (include)

sS rtrim_fromLines(Collection lines) {
  new StringBuilder buf;
  if (lines != null) {
    bool first = true;
    for (O line : lines) {
      if (first) first = false; else buf.append('\n');
      buf.append(str(line));
    }
  }
  ret buf.toString();
}

Author comment

Began life as a copy of #1002398

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017949
Snippet name: rtrim_fromLines - no \n after last line
Eternal ID of this version: #1017949/1
Text MD5: cdc10b5af990fb76c4362d16361ac0ac
Author: stefan
Category: javac
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-22 23:33:44
Source code size: 264 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 492 / 515
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)