|
|
template <class ForIter, class Size, class T> ForIter search_n(ForIter start, ForIter end, Size num, const T &val); template <class ForIter, class Size, class T, class BinPred> ForIter search_n(ForIter start, ForIter end, Size num, const T &val, BinPred pfn);
The search_n( ) algorithm searches for a sequence of num similar elements within a sequence. The sequence being searched is defined by start and end. If the subsequence is found, an iterator to its beginning is returned. Otherwise, end is returned.
The second form allows you to specify a binary predicate that determines when one element is equal to another.
|
|