Trait AsChar

pub trait AsChar: Copy

Transforms common types to a char for basic token parsing

Required Methods

fn as_char(self) -> char

makes a char from self

fn is_alpha(self) -> bool

Tests that self is an alphabetic character

Warning: for &str it recognizes alphabetic characters outside of the 52 ASCII letters

fn is_alphanum(self) -> bool

Tests that self is an alphabetic character or a decimal digit

fn is_dec_digit(self) -> bool

Tests that self is a decimal digit

fn is_hex_digit(self) -> bool

Tests that self is an hex digit

fn is_oct_digit(self) -> bool

Tests that self is an octal digit

fn is_bin_digit(self) -> bool

Tests that self is a binary digit

fn len(self) -> usize

Gets the len in bytes for self

fn is_space(self) -> bool

Tests that self is ASCII space or tab

fn is_newline(self) -> bool

Tests if byte is ASCII newline: \n

Implementors