Function encoding_rs::ascii::validate_ascii

source ยท
pub fn validate_ascii(slice: &[u8]) -> Option<(u8, usize)>
Expand description

Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being guaranteed to be non-ASCII (> 127), and the second being the offset where it is found