pub const fn convert<const RESULT_SIZE: usize, const STRING_SIZE: usize>(
        input: &[u8],
    ) -> [u8; RESULT_SIZE] {
        let mut data = [0_u8; RESULT_SIZE];
        let mut data_index: usize = 0;
        let mut char_index: usize = 0;

        while data_index < STRING_SIZE && char_index + 1 < STRING_SIZE {
            if !is_valid_delimiter(input[char_index]) {
                let mut next_index = char_index + 1;
                while next_index < STRING_SIZE && is_valid_delimiter(input[next_index]) {
                    next_index += 1;
                }
                data[data_index] =
                    to_ordinal(input[char_index]) * 16 + to_ordinal(input[next_index]);
                char_index = next_index + 1;
                data_index += 1;
            } else {
                char_index += 1;
            }
        }
        data
    }
// Converts a hex-string to its byte array representation.
Converts a hex-string to its byte array representation.
Converts a hex - string to its byte array representation .
pub const fn convert<const RESULT_SIZE: usize, const STRING_SIZE: usize>(
        input: &[u8],
    ) -> [u8; RESULT_SIZE] {
        let mut data = [0_u8; RESULT_SIZE];
        let mut data_index: usize = 0;
        let mut char_index: usize = 0;
        while data_index < STRING_SIZE && char_index + 1 < STRING_SIZE {
            if !is_valid_delimiter(input[char_index]) {
                let mut next_index = char_index + 1;
                while next_index < STRING_SIZE && is_valid_delimiter(input[next_index]) {
                    next_index += 1;
                }
                data[data_index] =
                    to_ordinal(input[char_index]) * 16 + to_ordinal(input[next_index]);
                char_index = next_index + 1;
                data_index += 1;
            } else {
                char_index += 1;
            }
        }
        data
    }
pub const fn convert < const RESULT_SIZE : usize , const STRING_SIZE : usize > ( input : & [ u8 ] , ) -> [ u8 ; RESULT_SIZE ] { let mut data = [ 0_u8 ; RESULT_SIZE ] ; let mut data_index : usize = 0 ; let mut char_index : usize = 0 ; while data_index < STRING_SIZE && char_index + 1 < STRING_SIZE { if ! is_valid_delimiter ( input [ char_index ] ) { let mut next_index = char_index + 1 ; while next_index < STRING_SIZE && is_valid_delimiter ( input [ next_index ] ) { next_index += 1 ; } data [ data_index ] = to_ordinal ( input [ char_index ] ) * 16 + to_ordinal ( input [ next_index ] ) ; char_index = next_index + 1 ; data_index += 1 ; } else { char_index += 1 ; } } data }
Converts a hex-string to its byte array representation.
Converts a hex - string to its byte array representation .
input
&[u8]
input
&[u8]