Skip to main content

hex_str_to_bytes

Function hex_str_to_bytes 

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

Strips the 0x prefix from a hex string and decodes it to bytes.

Treats the string as raw bytes if it doesn’t start with 0x.