Struct std::ascii::AsciiUnstable
[-]
[+]
[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 as_byte(&self) -> u8
Converts an ascii character into a u8.
fn to_byte(self) -> u8
Deprecated: use as_byte isntead.
fn as_char(&self) -> char
Converts an ascii character into a char.
fn to_char(self) -> char
Deprecated: use as_char isntead.
fn to_lowercase(&self) -> Ascii
Convert to lowercase.
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_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_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_lowercase(&self) -> bool
Checks if the character is alphabetic and lowercase
fn is_uppercase(&self) -> bool
Checks if the character is alphabetic and 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