about summary refs log tree commit diff
path: root/absl/strings/match.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/match.cc')
-rw-r--r--absl/strings/match.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/absl/strings/match.cc b/absl/strings/match.cc
index 3d10c57784eb..a2e9064c0760 100644
--- a/absl/strings/match.cc
+++ b/absl/strings/match.cc
@@ -18,15 +18,6 @@
 
 namespace absl {
 
-namespace {
-bool CaseEqual(absl::string_view piece1, absl::string_view piece2) {
-  return (piece1.size() == piece2.size() &&
-          0 == strings_internal::memcasecmp(piece1.data(), piece2.data(),
-                                            piece1.size()));
-  // memcasecmp uses ascii_tolower().
-}
-}  // namespace
-
 bool EqualsIgnoreCase(absl::string_view piece1, absl::string_view piece2) {
   return (piece1.size() == piece2.size() &&
           0 == absl::strings_internal::memcasecmp(piece1.data(), piece2.data(),
@@ -36,12 +27,12 @@ bool EqualsIgnoreCase(absl::string_view piece1, absl::string_view piece2) {
 
 bool StartsWithIgnoreCase(absl::string_view text, absl::string_view prefix) {
   return (text.size() >= prefix.size()) &&
-         CaseEqual(text.substr(0, prefix.size()), prefix);
+         EqualsIgnoreCase(text.substr(0, prefix.size()), prefix);
 }
 
 bool EndsWithIgnoreCase(absl::string_view text, absl::string_view suffix) {
   return (text.size() >= suffix.size()) &&
-         CaseEqual(text.substr(text.size() - suffix.size()), suffix);
+         EqualsIgnoreCase(text.substr(text.size() - suffix.size()), suffix);
 }
 
 }  // namespace absl