1 unstable release

0.0.1 Jun 13, 2022

#19 in #utf8

Download history 343/week @ 2023-12-01 476/week @ 2023-12-08 404/week @ 2023-12-15 321/week @ 2023-12-22 191/week @ 2023-12-29 448/week @ 2024-01-05 632/week @ 2024-01-12 466/week @ 2024-01-19 652/week @ 2024-01-26 784/week @ 2024-02-02 309/week @ 2024-02-09 495/week @ 2024-02-16 363/week @ 2024-02-23 613/week @ 2024-03-01 519/week @ 2024-03-08 468/week @ 2024-03-15

2,045 downloads per month
Used in 24 crates (3 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

~315KB