pub fn from_hex(value: &str) -> Result<Self, CreationError> {
        let mut string = value;
        let mut char_iterator = value.chars();
        if string.len() > 2
            && char_iterator.next().unwrap() == '0'
            && char_iterator.next().unwrap() == 'x'
        {
            string = &string[2..];
        }
        if string.is_empty() {
            return Err(CreationError::EmptyString);
        }
        if !Self::is_hex_string(string) {
            return Err(CreationError::InvalidHexString);
        }

        // Limbs are of 64 bits - 8 bytes
        // We have 16 nibbles per bytes
        let max_amount_of_hex_chars = NUM_LIMBS * 16;
        if string.len() > max_amount_of_hex_chars {
            return Err(CreationError::HexStringIsTooBig);
        }

        Ok(Self::from_hex_unchecked(string))
    }
Creates an `UnsignedInteger` from a hexstring. It can contain `0x` or not.
Returns an `CreationError::InvalidHexString`if the value is not a hexstring.
Returns a `CreationError::EmptyString` if the input string is empty.
Returns a `CreationError::HexStringIsTooBig` if the the input hex string is bigger
than the maximum amount of characters for this element.
crates/math/src/unsigned_integer/element.rs