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

6
LINES

< > BotCompany Repo | #1023057 // byteArraySetWithExponentialGrowth

JavaX fragment (include)

1  
static byte[] byteArraySetWithExponentialGrowth(byte[] array, int idx, byte element) {
2  
  if (idx >= l(array))
3  
    array = resizeByteArray(array, max(idx+1, iround(l(array)*1.5)));
4  
  array[idx] = element;
5  
  ret array;
6  
}

Author comment

Began life as a copy of #1023055

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023057
Snippet name: byteArraySetWithExponentialGrowth
Eternal ID of this version: #1023057/3
Text MD5: 64fb6f8610bd16339704de4ba6017ef8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-29 23:15:35
Source code size: 223 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 224 / 266
Version history: 2 change(s)
Referenced in: [show references]