Skip to main content

string_to_array

Function string_to_array 

Source
pub fn string_to_array<const N: usize>(s: &str) -> [u8; N]
Expand description

Turn a string into a fixed length array. If the string is shorter than the resulting array, it gets padded with \0s on the right. If longer, it gets truncated.