C++ Standard Library search() Sample

Description

search() attempts to find its second sequence as a subsequence of the first sequence, returning an iterator to the first occurrence within the first sequence.

Declaration

	template <class For, class For2>
	    For search(For, For, For2, For2);
	template <class For, class For2, class BinPred>
	    For search(For, For, For2, For2, BinPred);

Concept

The example program searches for a pattern string as a subsequence of another string, and displays the offset (5) of the pattern within the string.

Supported
Supported
Supported