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

7
LINES

< > BotCompany Repo | #1032902 // cloneSubShortArray (always return a copy)

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

Libraryless. Click here for Pure Java version (3802L/22K).

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

Author comment

Began life as a copy of #1017153

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032902
Snippet name: cloneSubShortArray (always return a copy)
Eternal ID of this version: #1032902/1
Text MD5: e1e48dd62c5d404acb66f64f09cbaa40
Transpilation MD5: eeab6c1f194a16cd620493bef0e968d3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-10 17:39:44
Source code size: 251 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 142 / 203
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1036512 - cloneSubDoubleArray (always return a copy)
#1036513 - cloneSubLongArray (always return a copy)