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

7
LINES

< > BotCompany Repo | #1008668 // shiftIntRange - shift IntRange to the right

JavaX fragment (include)

static IntRange shiftIntRange(int shift, IntRange r) {
  ret r == null ? null : shift == 0 ? r : intRange(r.start+shift, r.end+shift);
}

static IntRange shiftIntRange(IntRange r, int shift) {
  ret shiftIntRange(shift, r);
}

Author comment

Began life as a copy of #1008654

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1008668
Snippet name: shiftIntRange - shift IntRange to the right
Eternal ID of this version: #1008668/3
Text MD5: 6803b60849b085592d774a7d598c1306
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-11 20:26:39
Source code size: 227 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 612 / 656
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1035637 - shiftIntRanges - shift list of IntRanges to the right