Trait std::str::StrSlice

pub trait StrSlice<'self> {
    fn contains<'a>(&self, needle: &'a str) -> bool;
    fn contains_char(&self, needle: char) -> bool;
    fn iter(&self) -> CharIterator<'self>;
    fn rev_iter(&self) -> CharRevIterator<'self>;
    fn byte_iter(&self) -> ByteIterator<'self>;
    fn byte_rev_iter(&self) -> ByteRevIterator<'self>;
    fn char_offset_iter(&self) -> CharOffsetIterator<'self>;
    fn char_offset_rev_iter(&self) -> CharOffsetRevIterator<'self>;
    fn split_iter<Sep: CharEq>(&self, sep: Sep) -> CharSplitIterator<'self, Sep>;
    fn splitn_iter<Sep: CharEq>(&self, sep: Sep, count: uint) -> CharSplitNIterator<'self, Sep>;
    fn split_terminator_iter<Sep: CharEq>(&self, sep: Sep) -> CharSplitIterator<'self, Sep>;
    fn rsplit_iter<Sep: CharEq>(&self, sep: Sep) -> CharRSplitIterator<'self, Sep>;
    fn rsplitn_iter<Sep: CharEq>(&self, sep: Sep, count: uint) -> CharSplitNIterator<'self, Sep>;
    fn matches_index_iter(&self, sep: &'self str) -> MatchesIndexIterator<'self>;
    fn split_str_iter(&self, &'self str) -> StrSplitIterator<'self>;
    fn line_iter(&self) -> CharSplitIterator<'self, char>;
    fn any_line_iter(&self) -> AnyLineIterator<'self>;
    fn word_iter(&self) -> WordIterator<'self>;
    fn nfd_iter(&self) -> NormalizationIterator<'self>;
    fn nfkd_iter(&self) -> NormalizationIterator<'self>;
    fn ends_with(&self, needle: &str) -> bool;
    fn is_whitespace(&self) -> bool;
    fn is_alphanumeric(&self) -> bool;
    fn char_len(&self) -> uint;
    fn slice(&self, begin: uint, end: uint) -> &'self str;
    fn slice_from(&self, begin: uint) -> &'self str;
    fn slice_to(&self, end: uint) -> &'self str;
    fn slice_chars(&self, begin: uint, end: uint) -> &'self str;
    fn starts_with(&self, needle: &str) -> bool;
    fn escape_default(&self) -> ~str;
    fn escape_unicode(&self) -> ~str;
    fn trim(&self) -> &'self str;
    fn trim_left(&self) -> &'self str;
    fn trim_right(&self) -> &'self str;
    fn trim_chars<C: CharEq>(&self, to_trim: &C) -> &'self str;
    fn trim_left_chars<C: CharEq>(&self, to_trim: &C) -> &'self str;
    fn trim_right_chars<C: CharEq>(&self, to_trim: &C) -> &'self str;
    fn replace(&self, from: &str, to: &str) -> ~str;
    fn to_owned(&self) -> ~str;
    fn to_managed(&self) -> @str;
    fn to_utf16(&self) -> ~[u16];
    fn to_send_str(&self) -> SendStr;
    fn is_char_boundary(&self, index: uint) -> bool;
    fn char_range_at(&self, start: uint) -> CharRange;
    fn char_at(&self, i: uint) -> char;
    fn char_range_at_reverse(&self, start: uint) -> CharRange;
    fn char_at_reverse(&self, i: uint) -> char;
    fn as_bytes(&self) -> &'self [u8];
    fn find<C: CharEq>(&self, search: C) -> Option<uint>;
    fn rfind<C: CharEq>(&self, search: C) -> Option<uint>;
    fn find_str(&self, &str) -> Option<uint>;
    fn repeat(&self, nn: uint) -> ~str;
    fn slice_shift_char(&self) -> (char, &'self str);
    fn lev_distance(&self, t: &str) -> uint;
    fn subslice_offset(&self, inner: &str) -> uint;
    fn as_imm_buf<T>(&self, f: &fn(*u8, uint) -> T) -> T;
}

Required Methods

fn contains<'a>(&self, needle: &'a str) -> bool

fn contains_char(&self, needle: char) -> bool

fn iter(&self) -> CharIterator<'self>

fn rev_iter(&self) -> CharRevIterator<'self>

fn byte_iter(&self) -> ByteIterator<'self>

fn byte_rev_iter(&self) -> ByteRevIterator<'self>

fn char_offset_iter(&self) -> CharOffsetIterator<'self>

fn char_offset_rev_iter(&self) -> CharOffsetRevIterator<'self>

fn split_iter<Sep: CharEq>(&self, sep: Sep) -> CharSplitIterator<'self, Sep>

fn splitn_iter<Sep: CharEq>(&self, sep: Sep, count: uint) -> CharSplitNIterator<'self, Sep>

fn split_terminator_iter<Sep: CharEq>(&self, sep: Sep) -> CharSplitIterator<'self, Sep>

fn rsplit_iter<Sep: CharEq>(&self, sep: Sep) -> CharRSplitIterator<'self, Sep>

fn rsplitn_iter<Sep: CharEq>(&self, sep: Sep, count: uint) -> CharSplitNIterator<'self, Sep>

fn matches_index_iter(&self, sep: &'self str) -> MatchesIndexIterator<'self>

fn split_str_iter(&self, &'self str) -> StrSplitIterator<'self>

fn line_iter(&self) -> CharSplitIterator<'self, char>

fn any_line_iter(&self) -> AnyLineIterator<'self>

fn word_iter(&self) -> WordIterator<'self>

fn nfd_iter(&self) -> NormalizationIterator<'self>

fn nfkd_iter(&self) -> NormalizationIterator<'self>

fn ends_with(&self, needle: &str) -> bool

fn is_whitespace(&self) -> bool

fn is_alphanumeric(&self) -> bool

fn char_len(&self) -> uint

fn slice(&self, begin: uint, end: uint) -> &'self str

fn slice_from(&self, begin: uint) -> &'self str

fn slice_to(&self, end: uint) -> &'self str

fn slice_chars(&self, begin: uint, end: uint) -> &'self str

fn starts_with(&self, needle: &str) -> bool

fn escape_default(&self) -> ~str

fn escape_unicode(&self) -> ~str

fn trim(&self) -> &'self str

fn trim_left(&self) -> &'self str

fn trim_right(&self) -> &'self str

fn trim_chars<C: CharEq>(&self, to_trim: &C) -> &'self str

fn trim_left_chars<C: CharEq>(&self, to_trim: &C) -> &'self str

fn trim_right_chars<C: CharEq>(&self, to_trim: &C) -> &'self str

fn replace(&self, from: &str, to: &str) -> ~str

fn to_owned(&self) -> ~str

fn to_managed(&self) -> @str

fn to_utf16(&self) -> ~[u16]

fn to_send_str(&self) -> SendStr

fn is_char_boundary(&self, index: uint) -> bool

fn char_range_at(&self, start: uint) -> CharRange

fn char_at(&self, i: uint) -> char

fn char_range_at_reverse(&self, start: uint) -> CharRange

fn char_at_reverse(&self, i: uint) -> char

fn as_bytes(&self) -> &'self [u8]

fn find<C: CharEq>(&self, search: C) -> Option<uint>

fn rfind<C: CharEq>(&self, search: C) -> Option<uint>

fn find_str(&self, &str) -> Option<uint>

fn repeat(&self, nn: uint) -> ~str

fn slice_shift_char(&self) -> (char, &'self str)

fn lev_distance(&self, t: &str) -> uint

fn subslice_offset(&self, inner: &str) -> uint

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

Implementors