Libraryless. Click here for Pure Java version (9252L/51K).
static IntRange addToIntRange(IntRange r, int val) { if (r == null || r.empty()) ret new IntRange(val, val+1); if (val < r.start) ret intRange(val, r.end); if (val >= r.end) ret intRange(r.start, val+1); ret r; }
Began life as a copy of #1005874
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035502 |
Snippet name: | addToIntRange |
Eternal ID of this version: | #1035502/3 |
Text MD5: | 61e1d3195d78a8addc483c5fcbfc80cf |
Transpilation MD5: | a32b404b031ca6d4029913a511e5cff8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-30 18:02:24 |
Source code size: | 230 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 121 / 182 |
Version history: | 2 change(s) |
Referenced in: | [show references] |