pub fn generate_alphanumeric(length: usize) -> StringExpand description
Generates a random alphanumeric string of the specified length.
This function creates a string consisting of randomly selected characters from the
alphanumeric set (A-Z, a-z, 0-9) using the thread-local random number generator.
§Parameters
length: The length of the generated string.
§Returns
- A
Stringcontaininglengthrandomly chosen alphanumeric characters.
§Examples
use regd_testing;
let x = regd_testing::rand::generate_alphanumeric(12);
println!("Generated token: {}", x);
assert_eq!(x.len(), 12);