Trait Check

Source
pub trait Check {
    // Required methods
    fn is_letter(self) -> bool;
    fn is_lower(self) -> bool;
    fn is_upper(self) -> bool;
    fn is_digit(self) -> bool;
    fn is_space(self) -> bool;
    fn is_control(self) -> bool;
    fn is_printable(self) -> bool;
    fn is_us_ascii(self) -> bool;
    fn is_extended(self) -> bool;
}
Expand description

Defines the methods for ASCII operations on characters.

Required Methods§

Source

fn is_letter(self) -> bool

is_letter checks whether it is an ASCII letter (a-z / A-Z).

Source

fn is_lower(self) -> bool

is_lower checks whether it is an ASCII lower case letter (a-z).

Source

fn is_upper(self) -> bool

is_upper checks whether it is an ASCII upper case letter (A-Z).

Source

fn is_digit(self) -> bool

is_digit checks whether it is an ASCII digit (0-9).

Source

fn is_space(self) -> bool

is_space checks whether it is an ASCII space character (Space, Horizontal Tab, Line Feed, Vertical Tab, Form Feed, Carriage Return).

Source

fn is_control(self) -> bool

is_control checks whether it is an ASCII control character. The control characters are unprintable control codes and are used to control peripherals such as printers.

Source

fn is_printable(self) -> bool

is_printable checks whether it is an ASCII printable character. The printable characters are common for all the different variations of the ASCII table; represent letters, digits, punctuation marks, and a few miscellaneous symbols.

Source

fn is_us_ascii(self) -> bool

is_us_ascii checks whether it is an US-ASCII character.

Source

fn is_extended(self) -> bool

is_extended checks whether it is an extended ASCII character.

Implementations on Foreign Types§

Source§

impl Check for char

Source§

impl Check for u8

Implementors§