Operations on ASCII strings and characters.

Struct Ascii

pub struct Ascii {
    priv chr: u8,
}

Datatype to hold one ascii character. It wraps a u8, with the highest bit always zero.

Trait AsciiCast

Trait for converting into an ascii type.

Method to_ascii

fn to_ascii(&self) -> T

Convert to an ascii type

Method to_ascii_nocheck

unsafe fn to_ascii_nocheck(&self) -> T

Convert to an ascii type, not doing any range asserts

Method is_ascii

fn is_ascii(&self) -> bool

Check if convertible to ascii

Trait AsciiStr

Trait for converting an ascii type to a string. Needed to convert &[Ascii] to ~str

Method to_str_ascii

fn to_str_ascii(&self) -> ~str

Convert to a string.

Method to_lower

fn to_lower(&self) -> ~[Ascii]

Convert to vector representing a lower cased ascii string.

Method to_upper

fn to_upper(&self) -> ~[Ascii]

Convert to vector representing a upper cased ascii string.

Method eq_ignore_case

fn eq_ignore_case(self, other: &[Ascii]) -> bool

Compares two Ascii strings ignoring case

Trait OwnedAsciiCast

Trait for copyless casting to an ascii vector.

Method into_ascii

fn into_ascii(self) -> ~[Ascii]

Take ownership and cast to an ascii vector without trailing zero element.

Method into_ascii_nocheck

unsafe fn into_ascii_nocheck(self) -> ~[Ascii]

Take ownership and cast to an ascii vector without trailing zero element. Does not perform validation checks.

Trait ToBytesConsume

Trait to convert to a owned byte array by consuming self

Method into_bytes

fn into_bytes(self) -> ~[u8]

Converts to a owned byte array by consuming self

Implementation of ::std::clone::Clone for Ascii

Automatically derived.

Method clone

fn clone(&self) -> Ascii

Implementation of ::std::cmp::Eq for Ascii

Automatically derived.

Method eq

fn eq(&self, __arg_0: &Ascii) -> ::bool

Method ne

fn ne(&self, __arg_0: &Ascii) -> ::bool

Implementation for Ascii

Method to_byte

fn to_byte(self) -> u8

Converts a ascii character into a u8.

Method to_char

fn to_char(self) -> char

Converts a ascii character into a char.

Method to_lower

fn to_lower(self) -> Ascii

Convert to lowercase.

Method to_upper

fn to_upper(self) -> Ascii

Convert to uppercase.

Method eq_ignore_case

fn eq_ignore_case(self, other: Ascii) -> bool

Compares two ascii characters of equality, ignoring case.

Implementation of ToStr for Ascii

Method to_str

fn to_str(&self) -> ~str

Implementation of AsciiCast<&'self [Ascii]> for &'self [u8] where <'self>

Method to_ascii

fn to_ascii(&self) -> &'self [Ascii]

Method to_ascii_nocheck

unsafe fn to_ascii_nocheck(&self) -> &'self [Ascii]

Method is_ascii

fn is_ascii(&self) -> bool

Implementation of AsciiCast<&'self [Ascii]> for &'self str where <'self>

Method to_ascii

fn to_ascii(&self) -> &'self [Ascii]

Method to_ascii_nocheck

unsafe fn to_ascii_nocheck(&self) -> &'self [Ascii]

Method is_ascii

fn is_ascii(&self) -> bool

Implementation of AsciiCast<Ascii> for u8

Method to_ascii

fn to_ascii(&self) -> Ascii

Method to_ascii_nocheck

unsafe fn to_ascii_nocheck(&self) -> Ascii

Method is_ascii

fn is_ascii(&self) -> bool

Implementation of AsciiCast<Ascii> for char

Method to_ascii

fn to_ascii(&self) -> Ascii

Method to_ascii_nocheck

unsafe fn to_ascii_nocheck(&self) -> Ascii

Method is_ascii

fn is_ascii(&self) -> bool

Implementation of OwnedAsciiCast for ~[u8]

Method into_ascii

fn into_ascii(self) -> ~[Ascii]

Method into_ascii_nocheck

unsafe fn into_ascii_nocheck(self) -> ~[Ascii]

Implementation of OwnedAsciiCast for ~str

Method into_ascii

fn into_ascii(self) -> ~[Ascii]

Method into_ascii_nocheck

unsafe fn into_ascii_nocheck(self) -> ~[Ascii]

Implementation of AsciiStr for &'self [Ascii] where <'self>

Method to_str_ascii

fn to_str_ascii(&self) -> ~str

Method to_lower

fn to_lower(&self) -> ~[Ascii]

Method to_upper

fn to_upper(&self) -> ~[Ascii]

Method eq_ignore_case

fn eq_ignore_case(self, other: &[Ascii]) -> bool

Implementation of ToStrConsume for ~[Ascii]

Method into_str

fn into_str(self) -> ~str

Implementation of IterBytes for Ascii

Method iter_bytes

fn iter_bytes(&self, _lsb0: bool, f: &fn(buf: &[u8]) -> bool) -> bool

Implementation of ToBytesConsume for ~[Ascii]

Method into_bytes

fn into_bytes(self) -> ~[u8]