diff options
Diffstat (limited to 'absl/strings/match.h')
-rw-r--r-- | absl/strings/match.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/absl/strings/match.h b/absl/strings/match.h index 1dc0beaf..1eeafbbf 100644 --- a/absl/strings/match.h +++ b/absl/strings/match.h @@ -103,6 +103,16 @@ bool StartsWithIgnoreCase(absl::string_view text, bool EndsWithIgnoreCase(absl::string_view text, absl::string_view suffix) noexcept; +// Yields the longest prefix in common between both input strings. +// Pointer-wise, the returned result is a subset of input "a". +absl::string_view FindLongestCommonPrefix(absl::string_view a, + absl::string_view b); + +// Yields the longest suffix in common between both input strings. +// Pointer-wise, the returned result is a subset of input "a". +absl::string_view FindLongestCommonSuffix(absl::string_view a, + absl::string_view b); + ABSL_NAMESPACE_END } // namespace absl |