[#absl-c_search_n-033] = xref:absl.adoc[absl]::c_search_n :relfileprefix: ../ :mrdocs: `c_search_n` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <algorithm> `std::search_n()` function to search a container for the first sequence of N elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Sequence, typename Size, typename T> constexpr /* implementation-defined */ xref:absl/c_search_n-05.adoc[c_search_n]( Sequence& sequence, Size count, T&& value); ---- [.small]#xref:absl/c_search_n-05.adoc[_» more..._]# Overload of `c_search_n()` for using a predicate evaluation other than `==` as the function's test condition. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Sequence, typename Size, typename T, typename BinaryPredicate> constexpr /* implementation-defined */ xref:absl/c_search_n-03e.adoc[c_search_n]( Sequence& sequence, Size count, T&& value, BinaryPredicate&& pred); ---- [.small]#xref:absl/c_search_n-03e.adoc[_» more..._]# == Return Value An iterator to the beginning of the found run, or the end iterator if none is found. == Parameters [cols="1,4"] |=== | Name| Description | *sequence* | The container to search. | *count* | The number of consecutive matching elements to search for. | *value* | The value each of the consecutive elements must equal. | *pred* | The binary predicate used to compare elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#