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

6
LINES

< > BotCompany Repo | #1018001 // joinWithComma_specialLast

JavaX fragment (include)

static S joinWithComma_specialLast(L<S> l, S lastSep) {
  if (empty(l)) ret "";
  L<S> separators = rep(", ", l(l)-2);
  separators.add(lastSep);
  ret join_flex(separators, l);
}

Author comment

Began life as a copy of #1009473

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018001
Snippet name: joinWithComma_specialLast
Eternal ID of this version: #1018001/1
Text MD5: aefbb539864d2df41dfb9d2aa77566a6
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-25 11:45:29
Source code size: 184 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 363 / 509
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)