Expand description
§numeric-range — compact integer-range strings
Parse and format the familiar "1,3-5,7" range syntax used by print dialogs
(page ranges), CPU affinity lists (taskset/cgroups), line selectors, and
CLI flags — in both directions.
assert_eq!(numeric_range::parse("1,3-5,7").unwrap(), vec![1, 3, 4, 5, 7]);
assert_eq!(numeric_range::format(&[1, 3, 4, 5, 7]), "1,3-5,7");Zero dependencies, #![no_std] (needs only alloc).
Enums§
- Parse
Error - An error produced by
parse.