Shuffle lists based on Fisher-Yates shuffle algorithm
Note: Shufflr is also available for JavaScript as NPM package.
To use shufflr in your project simply follow this steps:
Add shufflr to your Cargo.toml:
toml
[dependencies]
shufflr = "0.1.0"
Import shufflr in your Rust code:
rust
use shufflr::shuffle;
Use shuffle method with an array to get a copy of it shuffled:
rust
let shuffled_array = shuffle(&original_array);
After cloning the repository, build the project with:
bash
cargo build
To run shufflr tests simply run:
bash
cargo test
If you like this project (or any other) and want to help me contiue to improve it or create new ones, check my Ko-fi profile and consider buying me a Speciality Coffee: