pub fn create_string_array<O: Offset>(
    length: usize,
    size: usize,
    null_density: f32,
    seed: u64,
) -> Utf8Array<O> {
    let mut rng = StdRng::seed_from_u64(seed);

    (0..length)
        .map(|_| {
            if rng.gen::<f32>() < null_density {
                None
            } else {
                let value = (&mut rng)
                    .sample_iter(&Alphanumeric)
                    .take(size)
                    .map(char::from)
                    .collect::<String>();
                Some(value)
            }
        })
        .collect()
}
/// Creates an random (but fixed-seeded) [`Utf8Array`] of a given length, number of characters and null density.
Creates an random (but fixed-seeded) [`Utf8Array`] of a given length, number of characters and null density.
Creates an random ( but fixed - seeded ) [ ` Utf8Array ` ] of a given length number of characters and null density .
pub fn create_string_array<O: Offset>(
    length: usize,
    size: usize,
    null_density: f32,
    seed: u64,
) -> Utf8Array<O> {
    let mut rng = StdRng::seed_from_u64(seed);
    (0..length)
        .map(|_| {
            if rng.gen::<f32>() < null_density {
                None
            } else {
                let value = (&mut rng)
                    .sample_iter(&Alphanumeric)
                    .take(size)
                    .map(char::from)
                    .collect::<String>();
                Some(value)
            }
        })
        .collect()
}
pub fn create_string_array < O : Offset > ( length : usize , size : usize , null_density : f32 , seed : u64 , ) -> Utf8Array < O > { let mut rng = StdRng :: seed_from_u64 ( seed ) ; ( 0 .. length ) . map ( | _ | { if rng . gen :: < f32 > ( ) < null_density { None } else { let value = ( & mut rng ) . sample_iter ( & Alphanumeric ) . take ( size ) . map ( char :: from ) . collect :: < String > ( ) ; Some ( value ) } } ) . collect ( ) }
Creates an random (but fixed-seeded) [`Utf8Array`] of a given length, number of characters and null density.
Creates an random ( but fixed - seeded ) [ ` Utf8Array ` ] of a given length number of characters and null density .
length
usize
size
usize
null_density
f32
seed
u64
length
usize
size
usize
null_density
f32
seed
u64