1 unstable release

0.0.1 Jun 13, 2022

#98 in #rand

Download history 553/week @ 2024-01-13 557/week @ 2024-01-20 547/week @ 2024-01-27 823/week @ 2024-02-03 260/week @ 2024-02-10 491/week @ 2024-02-17 387/week @ 2024-02-24 678/week @ 2024-03-02 435/week @ 2024-03-09 804/week @ 2024-03-16 467/week @ 2024-03-23 442/week @ 2024-03-30 711/week @ 2024-04-06 761/week @ 2024-04-13 757/week @ 2024-04-20 877/week @ 2024-04-27

3,177 downloads per month
Used in 25 crates (4 directly)

MIT/Apache

9KB
166 lines

rand-utf8

Random utf8 utility. This crate is #![no_std] but requires alloc.

Example

let mut rng = rand::rngs::SmallRng::seed_from_u64(0);
let my_str = rand_utf8::rand_utf8(&mut rng, 32);
assert_eq!(32, my_str.as_bytes().len());

License: MIT/Apache-2.0


lib.rs:

Random utf8 utility. This crate is #![no_std] but requires alloc.

Example

let mut rng = rand::rngs::SmallRng::seed_from_u64(0);
let my_str = rand_utf8::rand_utf8(&mut rng, 32);
assert_eq!(32, my_str.as_bytes().len());

Dependencies

~310KB