//! This file collects some functions that return a boolean value from //! a character. pub(super) fn is_wsp(c: char) -> bool { c == ' ' || c == '\t' } pub(crate) fn is_v_char(c: char) -> bool { ('!'..='~').contains(&c) } pub(super) fn is_wsp_or_v_char(c: char) -> bool { is_wsp(c) || is_v_char(c) } pub(super) fn is_not_newline(c: char) -> bool { c != '\n' && c != '\r' } pub(super) fn is_alpha(c: char) -> bool { c.is_ascii_alphabetic() } pub(super) fn is_decimal_digit(c: char) -> bool { c.is_ascii_digit() } pub(super) fn is_binary_digit(c: char) -> bool { c == '0' || c == '1' } pub(super) fn is_hexadecimal_digit(c: char) -> bool { is_decimal_digit(c) || ('A'..='F').contains(&c) || ('a'..='f').contains(&c) } pub(super) fn is_alpha_or_digit_or_hyphen(c: char) -> bool { is_alpha(c) || is_decimal_digit(c) || c == '-' } pub(super) fn is_char_value(c: char) -> bool { (' '..='~').contains(&c) && c != '"' }