1 unstable release

0.0.1 Jun 13, 2022

#103 in #rand

Download history 578/week @ 2024-10-07 428/week @ 2024-10-14 1458/week @ 2024-10-21 2535/week @ 2024-10-28 1344/week @ 2024-11-04 1830/week @ 2024-11-11 517/week @ 2024-11-18 562/week @ 2024-11-25 459/week @ 2024-12-02 531/week @ 2024-12-09 496/week @ 2024-12-16 154/week @ 2024-12-23 208/week @ 2024-12-30 612/week @ 2025-01-06 662/week @ 2025-01-13 510/week @ 2025-01-20

1,993 downloads per month
Used in 8 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

~315KB