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

11
LINES

< > BotCompany Repo | #1014424 // concatStringArrays (allows null arrays)

JavaX fragment (include)

static S[] concatStringArrays(S[]... arrays) {
  int l = 0;
  for (S[] a : arrays) l += l(a);
  S[] x = new S[l];
  int i = 0;
  for (S[] a : arrays) if (a != null) {
    System.arraycopy(a, 0, x, i, l(a));
    i += l(a);
  }
  ret x;
}

Author comment

Began life as a copy of #1003113

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: #1014424
Snippet name: concatStringArrays (allows null arrays)
Eternal ID of this version: #1014424/1
Text MD5: 0344278c7866d373d356b2266e393455
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-21 17:15:16
Source code size: 248 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 382 / 408
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)