absl::EndsWith

Returns whether a given string text ends with suffix.

Synopsis

Declared in <absl/strings/match.h>

constexpr
bool
EndsWith(
    std::string_view text,
    std::string_view suffix) noexcept;

Return Value

true if text ends with suffix, false otherwise.

Parameters

NameDescription
textThe string to test.
suffixThe suffix to look for.