random-string

Crates.iorandom-string
lib.rsrandom-string
version1.1.0
sourcesrc
created_at2020-10-10 11:35:21.820213
updated_at2024-01-10 20:50:52.048953
descriptionAllows to generate random strings based on a given charset and length.
homepage
repositoryhttps://github.com/DmitrijVC/random-string
max_upload_size
id297975
size5,304
FssAy (FssAy)

documentation

README

random-string

A simple crate that allows you to generate random strings based on a given charset and length.

Usage

Add a dependence in Cargo.toml

[dependencies]
random-string = "1.0"

Example

use random_string::generate;

fn main() {
    let charset = "1234567890";

    println!("[{}]", generate(6, charset));
}
Commit count: 20

cargo fmt