Crates.io | prange2 |
lib.rs | prange2 |
version | 3.0.0 |
source | src |
created_at | 2019-05-13 20:16:25.855592 |
updated_at | 2024-08-28 14:25:33.531454 |
description | Parse numeric ranges for indexing |
homepage | https://gitlab.com/d5b4b2/prange |
repository | https://gitlab.com/d5b4b2/prange |
max_upload_size | |
id | 134076 |
size | 8,758 |
Parse numeric ranges for indexing.
Inclusive-inclusive 1-based integer ranges. Parsed from strings.
"2" => [2]
"1-5" => [1, 2, 3, 4, 5]
"1-3,5-6" => [1, 2, 3, 5, 6]
"-3" => [1, 2, 3]
"1-" => [1, 2, 3, ..]
"1-3,2-4,7" => [1, 2, 3, 2, 3, 4, 7]