pub fn get_seeded_random<T>(seed: &str, range: Range<T>, n: usize) -> Vec<T>where
    T: PartialOrd<T> + SampleUniform,
Expand description

feeds a string as input seed and returns n random numbers in the given range

Examples

use string_randomiser::get_seeded_random;

let range = 0..10;
let n = 5;
let seed = "hello";

let random_numbers = get_seeded_random(seed, range, n);
println!("{:?}", random_numbers); // [7, 0, 4, 1, 3]
assert_eq!(random_numbers, vec![7, 0, 4, 1, 3]);