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

6
LINES

< > BotCompany Repo | #1029188 // resizeLongArray

JavaX fragment (include)

static long[] resizeLongArray(long[] a, int n) {
  if (n == lLongArray(a)) ret a;
  long[] b = new long[n];
  arraycopy(a, 0, b, 0, Math.min(lLongArray(a), n));
  ret b;
}

Author comment

Began life as a copy of #1028792

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029188
Snippet name: resizeLongArray
Eternal ID of this version: #1029188/1
Text MD5: 9299a0503e2930717848103826b84eed
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-24 17:27:38
Source code size: 176 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 204 / 251
Referenced in: [show references]