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 an old version of boost. Click here for the latest version's documentation home page.
PrevUpHomeNext

Function template find_token

boost::algorithm::find_token — Find token algorithm.

Synopsis

template<typename CollectionT, typename PredicateT> 
iterator_range< typename result_iterator_of< CollectionT >::type > 
find_token(CollectionT & Input, PredicateT Pred, 
token_compress_mode_type eCompress = token_compress_off);

Description

Look for a given token in the string. Token is a character that matches the given predicate. If the "token compress mode" is enabled, adjacent tokens are considered to be one match.

Parameters

Input

A input string.

Pred

An unary predicate to identify a token

eCompress

Enable/Disable compressing of adjacent tokens

Returns: An iterator_range delimiting the match. Returned iterator is either CollectionT::iterator or CollectionT::const_iterator , depending on the constness of the input parameter.
Notes: This function provides the strong exception-safety guarantee

Copyright 2002-2004 Pavol Droba

PrevUpHomeNext