Struct std::vec::SplitIterator

pub struct SplitIterator<'self, T> {
    priv v: &'self [T],
    priv n: uint,
    priv pred: &'self fn(t: &T) -> bool,
    priv finished: bool,
}

An iterator over the slices of a vector separated by elements that match a predicate function.

Trait Implementations

impl<'self, T> Iterator<&'self [T]> for SplitIterator<'self, T>

fn next(&mut self) -> Option<&'self [T]>

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

fn size_hint(&self) -> (uint, Option<uint>)

Return a lower bound and upper bound on the remaining length of the iterator.

The common use case for the estimate is pre-allocating space to store the results.