1 | static O[] concatArrays(O[]... arrays) { |
2 | int l = 0; |
3 | for (O[] a : arrays) l += l(a); |
4 | O[] x = new O[l]; |
5 | int i = 0; |
6 | for (O[] a : arrays) if (a != null) { |
7 | System.arraycopy(a, 0, x, i, l(a)); |
8 | i += l(a); |
9 | } |
10 | ret x; |
11 | } |
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: | #1003113 |
Snippet name: | concatArrays (allows null arrays) |
Eternal ID of this version: | #1003113/1 |
Text MD5: | eba005fccc474a06482dc2a51b2e7b30 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-06-03 03:58:07 |
Source code size: | 242 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 796 / 861 |
Referenced in: | [show references] |