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

10
LINES

< > BotCompany Repo | #1007865 // splitArrayRegularly

JavaX fragment (include)

static L<byte[]> splitArrayRegularly(byte[] a, int chunkSize) {
  assertTrue(chunkSize > 0);
  L<byte[]> l = new L;
  int i = 0;
  while (i < l(a)) {
    l.add(subArray(a, i, i+chunkSize));
    i += chunkSize;
  }
  ret l;
}

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: #1007865
Snippet name: splitArrayRegularly
Eternal ID of this version: #1007865/4
Text MD5: f9fc3aea7182ec3110287cbba77233f6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-12 13:59:31
Source code size: 233 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 454 / 479
Version history: 3 change(s)
Referenced in: [show references]