shufflr

Crates.ioshufflr
lib.rsshufflr
version0.1.2
sourcesrc
created_at2023-05-24 23:13:34.799652
updated_at2023-09-13 13:35:14.008102
descriptionShuffle a lists using Fisher-Yates algorithm
homepage
repositoryhttps://github.com/hectortosa/shufflr
max_upload_size
id873828
size5,485
Héctor Tortosa (hectortosa)

documentation

README

shufflr

crates.io Shufflr

Rust CI

Shuffle lists based on Fisher-Yates shuffle algorithm

Using shufflr

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:

    [dependencies]
    shufflr = "0.1.0"

Import shufflr in your Rust code:

    use shufflr::shuffle;

Use shuffle method with an array to get a copy of it shuffled:

    let shuffled_array = shuffle(&original_array);

Develop

After cloning the repository, build the project with:

    cargo build

To run shufflr tests simply run:

    cargo test

:heart: Like the project?

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:

ko-fi

Commit count: 81

cargo fmt