Trait std::char::Char

pub trait Char {
    fn is_alphabetic(&self) -> bool;
    fn is_XID_start(&self) -> bool;
    fn is_XID_continue(&self) -> bool;
    fn is_lowercase(&self) -> bool;
    fn is_uppercase(&self) -> bool;
    fn is_whitespace(&self) -> bool;
    fn is_alphanumeric(&self) -> bool;
    fn is_control(&self) -> bool;
    fn is_digit(&self) -> bool;
    fn is_digit_radix(&self, radix: uint) -> bool;
    fn to_digit(&self, radix: uint) -> Option<uint>;
    fn from_digit(num: uint, radix: uint) -> Option<char>;
    fn escape_unicode(&self, f: &fn(char));
    fn escape_default(&self, f: &fn(char));
    fn len_utf8_bytes(&self) -> uint;
    fn encode_utf8(&self, dst: &mut [u8]) -> uint;
}

Required Methods

fn is_alphabetic(&self) -> bool

fn is_XID_start(&self) -> bool

fn is_XID_continue(&self) -> bool

fn is_lowercase(&self) -> bool

fn is_uppercase(&self) -> bool

fn is_whitespace(&self) -> bool

fn is_alphanumeric(&self) -> bool

fn is_control(&self) -> bool

fn is_digit(&self) -> bool

fn is_digit_radix(&self, radix: uint) -> bool

fn to_digit(&self, radix: uint) -> Option<uint>

fn from_digit(num: uint, radix: uint) -> Option<char>

fn escape_unicode(&self, f: &fn(char))

fn escape_default(&self, f: &fn(char))

fn len_utf8_bytes(&self) -> uint

fn encode_utf8(&self, dst: &mut [u8]) -> uint

Encodes this character as utf-8 into the provided byte-buffer. The buffer must be at least 4 bytes long or a runtime failure will occur.

This will then return the number of characters written to the slice.

Implementors