absl::c_search

Container-based version of the <algorithm> std::search() function to search a container for a subsequence.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename Sequence1,
    typename Sequence2>
constexpr
/* implementation-defined */
c_search(
    Sequence1& sequence,
    Sequence2& subsequence);

Return Value

An iterator to the beginning of the first occurrence of subsequence, or the end iterator if none is found.

Parameters

NameDescription
sequenceThe container to search.
subsequenceThe subsequence to search for.