BloombergLP::bdlb::StringViewUtil::strstrCaseless

Return a bsl::string_view object referring to the first occurrence in (the referent data of) the specified string at which (the referent data of) the specified subString is found using case-insensitive comparisons, or bsl::string_view() if there is no such occurrence. See {Caseless Comparisons}. If subString has zero length then a zero-length reference to the beginning of string is returned (i.e., bsl::string_view(string.data(), 0));

Synopsis

Declared in <bdlb_stringviewutil.h>

static
std::string_view
strstrCaseless(
    std::string_view const& string,
    std::string_view const& subString);