Boost C++ Libraries

...one 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.
PrevUpHomeNext

Function template token_finder

boost::algorithm::token_finder — "Token" finder

Synopsis

// In header: <boost/algorithm/string/finder.hpp>


template<typename PredicateT> 
  unspecified token_finder(PredicateT Pred, 
                           token_compress_mode_type eCompress = token_compress_off);

Description

Construct the token_finder. The finder searches for a token specified by a predicate. It is similar to std::find_if algorithm, with an exception that it return a range of instead of a single iterator.

If "compress token mode" is enabled, adjacent matching tokens are concatenated into one match. Thus the finder can be used to search for continuous segments of characters satisfying the given predicate.

The result is given as an iterator_range delimiting the match.

Parameters:

Pred

An element selection predicate

eCompress

Compress flag

Returns:

An instance of the token_finder object


PrevUpHomeNext