Skip to main content

hex_to_bytes

Function hex_to_bytes 

Source
pub fn hex_to_bytes(hex: &str) -> Vec<u8> 
Expand description

Convert a "0xabcd" hex string to raw bytes [0xab, 0xcd].

The "0x" prefix is optional; an empty string returns an empty Vec.