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

12
LINES

< > BotCompany Repo | #1009467 // join_flex (join with varying separators)

JavaX fragment (include)

static String join_flex(L<S> glues, Iterable<String> strings) {
  if (strings == null) ret "";
  new StringBuilder buf;
  Iterator<S> i = strings.iterator();
  Iterator<S> iGlues = glues.iterator();
  if (i.hasNext()) {
    buf.append(i.next());
    while (i.hasNext())
      buf.append(iGlues.next()).append(i.next());
  }
  return buf.toString();
}

Author comment

Began life as a copy of #1000810

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: #1009467
Snippet name: join_flex (join with varying separators)
Eternal ID of this version: #1009467/4
Text MD5: dee74036c614f6f74dccf09493946e99
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-23 21:34:18
Source code size: 361 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 453 / 603
Version history: 3 change(s)
Referenced in: [show references]