Struct std::str::CharSplitIterator

pub struct CharSplitIterator<'self, Sep> {
    priv string: &'self str,
    priv sep: Sep,
    priv allow_trailing_empty: bool,
    priv only_ascii: bool,
    priv finished: bool,
}

An iterator over the substrings of a string, separated by sep.

Trait Implementations

impl<'self, Sep: Clone> Clone for CharSplitIterator<'self, Sep>

fn clone(&self) -> CharSplitIterator<'self, Sep>

Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.

impl<'self, Sep: CharEq> Iterator<&'self str> for CharSplitIterator<'self, Sep>

fn next(&mut self) -> Option<&'self str>

Advance the iterator and return the next value. Return None when the end is reached.

impl<'self, Sep: CharEq> DoubleEndedIterator<&'self str> for CharSplitIterator<'self, Sep>

fn next_back(&mut self) -> Option<&'self str>

Yield an element from the end of the range, returning None if the range is empty.