Skip to main content

validate_digits

Function validate_digits 

Source
pub(crate) fn validate_digits(code: &[u8]) -> Result<(), FormatError>
Expand description

Validate that every byte of code is an ASCII digit '0'..='9'.

ยงErrors

Returns FormatError::NonDigit at the position of the first non-digit byte.