1 unstable release

0.0.1 Jun 13, 2022

#22 in #utf8

Download history 663/week @ 2024-03-15 629/week @ 2024-03-22 417/week @ 2024-03-29 713/week @ 2024-04-05 688/week @ 2024-04-12 687/week @ 2024-04-19 966/week @ 2024-04-26 649/week @ 2024-05-03 551/week @ 2024-05-10 785/week @ 2024-05-17 762/week @ 2024-05-24 929/week @ 2024-05-31 569/week @ 2024-06-07 684/week @ 2024-06-14 640/week @ 2024-06-21 342/week @ 2024-06-28

2,409 downloads per month
Used in 17 crates (2 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

~305KB