1 unstable release

0.0.1 Jun 13, 2022

#27 in #utf8

Download history 1856/week @ 2024-11-08 837/week @ 2024-11-15 540/week @ 2024-11-22 560/week @ 2024-11-29 384/week @ 2024-12-06 615/week @ 2024-12-13 240/week @ 2024-12-20 124/week @ 2024-12-27 484/week @ 2025-01-03 745/week @ 2025-01-10 498/week @ 2025-01-17 479/week @ 2025-01-24 782/week @ 2025-01-31 1205/week @ 2025-02-07 443/week @ 2025-02-14

2,500 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

~325KB