absl::StrContainsIgnoreCase

Returns whether a given ASCII string haystack contains the ASCII substring needle, ignoring case in the comparison.

Synopsis

Declared in <absl/strings/match.h>

bool
StrContainsIgnoreCase(
    std::string_view haystack,
    std::string_view needle) noexcept;

Return Value

true if needle is found in haystack, false otherwise.

Parameters

NameDescription
haystackThe string to search within.
needleThe substring to search for.