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 nth_finder

boost::algorithm::nth_finder — "Nth" finder

Synopsis

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


template<typename RangeT> 
  unspecified nth_finder(const RangeT & Search, int Nth);
template<typename RangeT, typename PredicateT> 
  unspecified nth_finder(const RangeT & Search, int Nth, PredicateT Comp);

Description

Construct the nth_finder. The finder searches for the n-th (zero-indexed) occurrence of the string in a given input. The result is given as an iterator_range delimiting the match.

Parameters:

Nth

An index of the match to be find

Search

A substring to be searched for.

Returns:

An instance of the nth_finder object


PrevUpHomeNext