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

7
LINES

< > BotCompany Repo | #1036513 // cloneSubLongArray (always return a copy)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (263L/2K).

static long[] cloneSubLongArray(long[] b, int start, int end) {
  start = max(start, 0); end = min(end, l(b));
  if (start >= end) ret new long[0];
  long[] x = new[end-start];
  System.arraycopy(b, start, x, 0, end-start);
  ret x;
}

Author comment

Began life as a copy of #1032902

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036513
Snippet name: cloneSubLongArray (always return a copy)
Eternal ID of this version: #1036513/1
Text MD5: 6deb97a5e31d267f107b44e88f8d78f3
Transpilation MD5: dcafd3c993ce674416ad872de5697dfa
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-01-21 20:08:03
Source code size: 240 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 67 / 98
Referenced in: [show references]