fn matrix(n_chars: &usize, custom_chars: &String) {
    let mut line = String::new();

    for _ in 0..*n_chars {
        let random_index = rand::thread_rng().gen_range(0..custom_chars.len());
        line.push(custom_chars.chars().nth(random_index).unwrap());
    }

    println!("{}", line);
}
// arguments :
// - n_chars : number of characters
// - custom_chars : string to choose random characters from
//
// this function will :
//
// - generate a random string with chars from custom_chars of length n_chars
// - print the string
arguments :
n_chars : number of characters
custom_chars : string to choose random characters from

this function will .

generate a random string with chars from custom_chars of length n_chars
print the string
arguments : n_chars : number of characters custom_chars : string to choose random characters from this function will . generate a random string with chars from custom_chars of length n_chars print the string
fn matrix(n_chars: &usize, custom_chars: &String) {
    let mut line = String::new();
    for _ in 0..*n_chars {
        let random_index = rand::thread_rng().gen_range(0..custom_chars.len());
        line.push(custom_chars.chars().nth(random_index).unwrap());
    }
    println!("{}", line);
}
fn matrix ( n_chars : & usize , custom_chars : & String ) { let mut line = String :: new ( ) ; for _ in 0 .. * n_chars { let random_index = rand :: thread_rng ( ) . gen_range ( 0 .. custom_chars . len ( ) ) ; line . push ( custom_chars . chars ( ) . nth ( random_index ) . unwrap ( ) ) ; } println ! ( " " line ) ; }
arguments :
 n_chars : number of characters
 custom_chars : string to choose random characters from
arguments : n_chars : number of characters custom_chars : string to choose random characters from
n_chars
&usize
custom_chars
&String