absl::FindLongestCommonSuffix

Yields the longest suffix in common between both input strings. Pointer-wise, the returned result is a subset of input "a".

Synopsis

Declared in <absl/strings/match.h>

std::string_view
FindLongestCommonSuffix(
    std::string_view a,
    std::string_view b);

Return Value

The longest common suffix, as a view into a.

Parameters

NameDescription
aThe first string to compare.
bThe second string to compare.