pub(crate) fn check_str_validity(s: &str) -> Result<(), ParseError> {
    if !s.chars().all(|c| {
        char::is_ascii_alphanumeric(&c)
            || char::is_ascii_punctuation(&c)
            || char::is_ascii_whitespace(&c)
    }) {
        Err(ParseError::InvalidInputString)
    } else {
        Ok(())
    }
}
/// Helper function to validate the input string.
Helper function to validate the input string.
Helper function to validate the input string .
pub(crate) fn check_str_validity(s: &str) -> Result<(), ParseError> {
    if !s.chars().all(|c| {
        char::is_ascii_alphanumeric(&c)
            || char::is_ascii_punctuation(&c)
            || char::is_ascii_whitespace(&c)
    }) {
        Err(ParseError::InvalidInputString)
    } else {
        Ok(())
    }
}
pub ( crate ) fn check_str_validity ( s : & str ) -> Result < ( ) , ParseError > { if ! s . chars ( ) . all ( | c | { char :: is_ascii_alphanumeric ( & c ) || char :: is_ascii_punctuation ( & c ) || char :: is_ascii_whitespace ( & c ) } ) { Err ( ParseError :: InvalidInputString ) } else { Ok ( ( ) ) } }
Helper function to validate the input string.
Helper function to validate the input string .
s
&str
s
&str