4 releases
0.4.3 | Nov 16, 2024 |
---|---|
0.4.2 | Nov 16, 2024 |
0.4.1 | Nov 13, 2024 |
0.3.0 | Nov 7, 2024 |
#1285 in Rust patterns
247 downloads per month
57KB
1.5K
SLoC
rangex-rs
Clear range expression for exclusive/inclusive, forward/backward, and step great than 1 or less than -1, with index support
lib.rs
:
This crate provides clear range expression for exclusive/inclusive, forward/backward, and step great than 1 or less than -1, with index support.
The most convenient way is to use the following macros:
range_inclusive!(start, stop)
This is the same as start..=stop
range_exclusive!(start, stop)
This is the same as start..stop
range_inclusive!(type, start, stop)
Creates range for type from start through stop, by step 1
range_inclusive!(type, start, stop, step)
Creates range for type from start through stop, by step
indexed_range_inclusive!(type, start, stop)
Creates indexed range for type from start through stop, by step 1
indexed_range_inclusive!(type, start, stop, step)
Creates indexed range for type from start through stop, by step
Dependencies
~465KB