Crates.io | arrange |
lib.rs | arrange |
version | 0.1.3 |
source | src |
created_at | 2021-04-14 14:15:47.592169 |
updated_at | 2021-04-15 20:52:08.030491 |
description | Convenience functions for populating an array with values from a range. |
homepage | https://github.com/cryptopatrick/arrange |
repository | https://github.com/cryptopatrick/arrange |
max_upload_size | |
id | 383979 |
size | 13,044 |
Convenience functions for populating an array with values from a range.
Dual-licensed under MIT or the UNLICENSE.
This crate works with Cargo and is on
crates.io.
The package will be regularly updated.
Add it to your Cargo.toml
like so:
[dependencies]
arrange = "0.1.3"
Usage is simple:
extern crate arrange;
use arrange::IntRange;
fn main() {
assert_eq!(IntRange::new(1, 10, 1).range(), [1, 2, 3, 4, 5, 6, 7, 8, 9]);
}
Some may want to negative indexing but we won't implement that for the time being since they can be prone to bugs.
Still a lot of work to do.
Make sure to use version 0.1.1 or above.