Struct std::ascii::Ascii[src]
pub struct Ascii {
// some fields omitted
}Datatype to hold one ascii character. It wraps a u8, with the highest bit always zero.
Methods
impl Ascii
fn to_byte(self) -> u8
Converts an ascii character into a u8.
fn to_char(self) -> char
Converts an ascii character into a char.
fn to_lower(self) -> Ascii
fn to_lowercase(self) -> Ascii
Convert to lowercase.
fn to_upper(self) -> Ascii
fn to_uppercase(self) -> Ascii
Convert to uppercase.
fn eq_ignore_case(self, other: Ascii) -> bool
Compares two ascii characters of equality, ignoring case.
fn is_alpha(&self) -> bool
fn is_alphabetic(&self) -> bool
Check if the character is a letter (a-z, A-Z)
fn is_digit(&self) -> bool
Check if the character is a number (0-9)
fn is_alnum(&self) -> bool
fn is_alphanumeric(&self) -> bool
Check if the character is a letter or number
fn is_blank(&self) -> bool
Check if the character is a space or horizontal tab
fn is_control(&self) -> bool
Check if the character is a control character
fn is_graph(&self) -> bool
Checks if the character is printable (except space)
fn is_print(&self) -> bool
Checks if the character is printable (including space)
fn is_lower(&self) -> bool
fn is_lowercase(&self) -> bool
Checks if the character is lowercase
fn is_upper(&self) -> bool
fn is_uppercase(&self) -> bool
Checks if the character is uppercase
fn is_punctuation(&self) -> bool
Checks if the character is punctuation
fn is_hex(&self) -> bool
Checks if the character is a valid hex digit