pub fn validate_cs(text: &[u8]) -> TextValidationOutcome {
    if text.iter().cloned().all(|c| match c {
        b' ' | b'_' => true,
        c => (c >= b'0' && c <= b'9') || (c >= b'A' && c <= b'Z'),
    }) {
        TextValidationOutcome::Ok
    } else {
        TextValidationOutcome::NotOk
    }
}
/// Check whether the given byte slice contains only valid characters for a
/// Code String value representation.
Check whether the given byte slice contains only valid characters for a
Code String value representation.
Check whether the given byte slice contains only valid characters for a Code String value representation .
pub fn validate_cs(text: &[u8]) -> TextValidationOutcome {
    if text.iter().cloned().all(|c| match c {
        b' ' | b'_' => true,
        c => (c >= b'0' && c <= b'9') || (c >= b'A' && c <= b'Z'),
    }) {
        TextValidationOutcome::Ok
    } else {
        TextValidationOutcome::NotOk
    }
}
pub fn validate_cs ( text : & [ u8 ] ) -> TextValidationOutcome { if text . iter ( ) . cloned ( ) . all ( | c | match c { b' ' | b'_' => true , c => ( c >= b'0' && c <= b'9' ) || ( c >= b'A' && c <= b'Z' ) , } ) { TextValidationOutcome :: Ok } else { TextValidationOutcome :: NotOk } }
Check whether the given byte slice contains only valid characters for a
Code String value representation.
Check whether the given byte slice contains only valid characters for a Code String value representation .
text
&[u8]
text
&[u8]