str_to_byte_array

Function str_to_byte_array 

Source
pub fn str_to_byte_array(s: &str) -> Result<Vec<u8>>
Expand description

Convert string to vector of raw bytes (0..=255) treating each char’s codepoint (0..=255). For bytes above ASCII range, the direct low-byte value of the char is used (mirroring JS charCodeAt & 0xFF).