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

7
LINES

< > BotCompany Repo | #1031650 // intArrayToIntRanges_startAndLength

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

Libraryless. Click here for Pure Java version (2925L/17K).

static L<IntRange> intArrayToIntRanges_startAndLength(int[] array) {
  int n = l(array)/2;
  L<IntRange> out = emptyList(n);
  for i to n:
    out.add(intRangeWithLength(array[i*2], array[i*2+1]));
  ret out;
}

Author comment

Began life as a copy of #1031649

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031650
Snippet name: intArrayToIntRanges_startAndLength
Eternal ID of this version: #1031650/3
Text MD5: 3d4fa19be5051dad3610bb2a5129a871
Transpilation MD5: 01ef25be366da1ac449e049c7945a138
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-25 03:17:30
Source code size: 216 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 177 / 254
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)