Home | Libraries | People | FAQ | More |
boost::algorithm::split_iterator — split_iterator
// In header: <boost/algorithm/string/find_iterator.hpp> template<typename IteratorT> class split_iterator : public iterator_facade< split_iterator< IteratorT >, const iterator_range< IteratorT >, forward_traversal_tag > { public: // construct/copy/destruct split_iterator(); 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
public
construct/copy/destructsplit_iterator();Default constructor.
Construct null iterator. All null iterators are equal.
Postconditions: |
eof()==true |
split_iterator(const split_iterator & Other);Copy constructor.
Construct a copy of the split_iterator
template<typename FinderT> split_iterator(IteratorT Begin, IteratorT End, FinderT Finder);Constructor.
Construct new split_iterator
for a given finder and a range.
template<typename FinderT, typename RangeT> split_iterator(RangeT & Col, FinderT Finder);Constructor.
Construct new split_iterator
for a given finder and a collection.
split_iterator
public member functionsbool eof() const;Eof check.
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 functionsconst match_type & dereference() const;
void increment();
bool equal(const split_iterator & Other) const;