| Crates.io | rand-utf8 |
| lib.rs | rand-utf8 |
| version | 0.0.2 |
| created_at | 2022-06-13 21:12:08.285834+00 |
| updated_at | 2025-06-23 11:35:26.104354+00 |
| description | Random utf8 utility |
| homepage | |
| repository | https://github.com/holochain/rand-utf8 |
| max_upload_size | |
| id | 605358 |
| size | 13,992 |
Random utf8 utility. This crate is #![no_std] but requires alloc.
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