Function gen_random_string

Source
pub fn gen_random_string(
    number_of_characters: usize,
    output_char_type: OutputCharsType,
) -> String
Expand description

Generates a random characters string.

This function uses ThreadRng in rand crate internally.

ยงExample

use rsgen::{gen_random_string, OutputCharsType};
 
let output_chars_type = OutputCharsType::LatinAlphabetAndNumeric {
    use_upper_case: true,
    use_lower_case: true,
};
let _random_string = gen_random_string(32, output_chars_type);