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

11
LINES

< > BotCompany Repo | #1016682 // concatShortArrays (allows null arrays)

JavaX fragment (include)

static short[] concatShortArrays(L<short[]> arrays) {
  int l = 0;
  for (short[] a : unnull(arrays)) l += l(a);
  short[] x = new short[l];
  int i = 0;
  for (short[] a : unnull(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 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016682
Snippet name: concatShortArrays (allows null arrays)
Eternal ID of this version: #1016682/4
Text MD5: 94f6f68f4f5345ab5df41f57d1750dc5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-28 00:18:33
Source code size: 287 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 394 / 424
Version history: 3 change(s)
Referenced in: [show references]