Skip to main content

parse_byte_array

Function parse_byte_array 

Source
pub fn parse_byte_array<const N: usize>(
    bytes_str: &str,
) -> Result<[u8; N], String>
Expand description

Parse a byte array from a string. The string should be in the format "[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]". Returns an error if the string is not in the correct format.