Libraryless. Click here for Pure Java version (7688L/43K).
static IntRange parseHexRange(S s) { LS parts = splitAtMinus(s); int start = hexToInt(first(parts)); if (empty(parts)) null; else if (l(parts) == 1) ret intRange_incl(start, start); else if (l(parts) == 2) { int end = hexToInt(second(parts)); ret intRange_incl(start, end); } else fail("Too many minuses"); }
Began life as a copy of #1035095
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035109 |
| Snippet name: | parseHexRange |
| Eternal ID of this version: | #1035109/1 |
| Text MD5: | 4355f3507c79b9b5cd773e053891d8e0 |
| Transpilation MD5: | 151f96520c82c63237f377f8e8bb6409 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-30 03:36:15 |
| Source code size: | 352 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 336 / 437 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |