absl::StartsWithIgnoreCase

Returns whether a given ASCII string text starts with prefix, ignoring case in the comparison.

Synopsis

Declared in <absl/strings/match.h>

bool
StartsWithIgnoreCase(
    std::string_view text,
    std::string_view prefix) noexcept;

Return Value

true if text starts with prefix ignoring case, false otherwise.

Parameters

NameDescription
textThe string to test.
prefixThe prefix to look for.