1 unstable release

0.0.1 Jun 13, 2022

#89 in #rand

Download history 612/week @ 2024-07-26 702/week @ 2024-08-02 486/week @ 2024-08-09 473/week @ 2024-08-16 485/week @ 2024-08-23 589/week @ 2024-08-30 644/week @ 2024-09-06 709/week @ 2024-09-13 862/week @ 2024-09-20 527/week @ 2024-09-27 658/week @ 2024-10-04 543/week @ 2024-10-11 417/week @ 2024-10-18 2989/week @ 2024-10-25 1503/week @ 2024-11-01 1375/week @ 2024-11-08

6,408 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

~315KB