prange2

Crates.ioprange2
lib.rsprange2
version3.0.1
sourcesrc
created_at2019-05-13 20:16:25.855592
updated_at2024-11-20 11:33:28.048071
descriptionParse numeric ranges for indexing
homepagehttps://gitlab.com/d5b4b2/prange
repositoryhttps://gitlab.com/d5b4b2/prange
max_upload_size
id134076
size8,758
(6aa476)

documentation

https://docs.rs/prange2

README

prange

Parse numeric ranges for indexing.

Inclusive-inclusive 1-based integer ranges. Parsed from strings.

Examples

"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]
Commit count: 55

cargo fmt