Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

Class template split_iterator

boost::algorithm::split_iterator — split_iterator


template<typename IteratorT> 
class split_iterator {
// construct/copy/destruct
split_iterator(const split_iterator &);
template<typename FinderT> split_iterator(IteratorT, IteratorT, FinderT);
template<typename FinderT, typename RangeT> 
split_iterator(RangeT &, FinderT);

// public member functions
bool eof() const;

// private member functions
const match_type & dereference() const;
void increment() ;
bool equal(const split_iterator &) const;


Split iterator encapsulates a Finder and allows for incremental searching in a string. Unlike the find iterator, split iterator iterates through gaps between matches.

Find iterator is a readable forward traversal iterator.

Dereferencing the iterator yields an iterator_range delimiting the current match.

split_iterator construct/copy/destruct

  1. split_iterator();

    Construct null iterator. All null iterators are equal.

    Postconditions: eof()==true

  2. split_iterator(const split_iterator & Other);

    Construct a copy of the split_iterator

  3. template<typename FinderT> 
    split_iterator(IteratorT Begin, IteratorT End, FinderT Finder);

    Construct new split_iterator for a given finder and a range.

  4. template<typename FinderT, typename RangeT> 
    split_iterator(RangeT & Col, FinderT Finder);

    Construct new split_iterator for a given finder and a collection.

split_iterator public member functions

  1. bool eof() const;

    Check the eof condition. Eof condition means that there is nothing more to be searched i.e. find_iterator is after the last match.

split_iterator private member functions

  1. const match_type & dereference() const;
  2. void increment() ;
  3. bool equal(const split_iterator & Other) const;
Copyright 2002-2004 Pavol Droba