Trait std::str::OwnedStr

pub trait OwnedStr {
    fn push_str_no_overallocate(&mut self, rhs: &str);
    fn push_str(&mut self, rhs: &str);
    fn push_char(&mut self, c: char);
    fn pop_char(&mut self) -> char;
    fn shift_char(&mut self) -> char;
    fn unshift_char(&mut self, ch: char);
    fn append(self, rhs: &str) -> ~str;
    fn reserve(&mut self, n: uint);
    fn reserve_at_least(&mut self, n: uint);
    fn capacity(&self) -> uint;
    fn truncate(&mut self, len: uint);
    fn into_bytes(self) -> ~[u8];
    fn as_mut_buf<T>(&mut self, f: &fn(*mut u8, uint) -> T) -> T;
}

Required Methods

fn push_str_no_overallocate(&mut self, rhs: &str)

fn push_str(&mut self, rhs: &str)

fn push_char(&mut self, c: char)

fn pop_char(&mut self) -> char

fn shift_char(&mut self) -> char

fn unshift_char(&mut self, ch: char)

fn append(self, rhs: &str) -> ~str

fn reserve(&mut self, n: uint)

fn reserve_at_least(&mut self, n: uint)

fn capacity(&self) -> uint

fn truncate(&mut self, len: uint)

fn into_bytes(self) -> ~[u8]

fn as_mut_buf<T>(&mut self, f: &fn(*mut u8, uint) -> T) -> T

Work with the mutable byte buffer and length of a slice.

The buffer does not have a null terminator.

The caller must make sure any mutations to this buffer keep the string valid UTF-8!

Implementors