C++ Standard Library search_n() Sample

Description

search_n() searches for a subsequence of at least N matches for a specified element, within a sequence, and returns an iterator to the first element of the matching subsequence.

Declaration

	template <class For, class Size, class T>
	    For search_n(For, For, Size, const T&);
	template <class For, class Size, class T, class BinPred>
	    For search_n(For, For, Size, const T&, BinPred);

Concept

The example searches through a string to find a sequence of 8 or more X characters. The sequence is found starting at offset 6 in the string.

Supported
Supported
Supported