Libraryless. Click here for Pure Java version (2989L/17K).
1 | static O[] spliceObjectArray(O[] a, int from, int to, O[] b) { |
2 | int lA = l(a), lB = l(b); |
3 | O[] newArray = new[lA-(to-from)+lB]; |
4 | copyArray(a, 0, newArray, 0, from); |
5 | copyArray(b, 0, newArray, from, lB); |
6 | copyArray(a, to, newArray, from+lB, lA-from); |
7 | ret newArray; |
8 | } |
Began life as a copy of #1026315
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1031855 |
Snippet name: | spliceObjectArray - take out part and put in something new. note: second int is TO, not LENGTH |
Eternal ID of this version: | #1031855/1 |
Text MD5: | 6773a7c391cad9e163ac239f4449be21 |
Transpilation MD5: | f4cf78569521d74034674b32e07e327f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-07-16 06:32:42 |
Source code size: | 279 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 157 / 220 |
Referenced in: | [show references] |