Trait AsChar
trait AsChar
Transforms a token into a char for basic string parsing
Required Methods
fn as_char(self: Self) -> charMakes a char from self
Example
use *; assert_eq!; assert_eq!;fn is_alpha(self: Self) -> boolTests that self is an alphabetic character
Warning: for
&strit matches alphabetic characters outside of the 52 ASCII lettersfn is_alphanum(self: Self) -> boolTests that self is an alphabetic character or a decimal digit
fn is_dec_digit(self: Self) -> boolTests that self is a decimal digit
fn is_hex_digit(self: Self) -> boolTests that self is an hex digit
fn is_oct_digit(self: Self) -> boolTests that self is an octal digit
fn len(self: Self) -> usizeGets the len in bytes for self
fn is_space(self: Self) -> boolTests that self is ASCII space or tab
fn is_newline(self: Self) -> boolTests if byte is ASCII newline: \n
Implementors
impl AsChar for &u8impl AsChar for u8impl AsChar for &charimpl AsChar for char