summaryrefslogtreecommitdiff
path: root/src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc')
-rw-r--r--src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc b/src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc
index a2e9064c076..2d67250970a 100644
--- a/src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc
+++ b/src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/match.cc
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,22 +17,27 @@
#include "absl/strings/internal/memutil.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
-bool EqualsIgnoreCase(absl::string_view piece1, absl::string_view piece2) {
+bool EqualsIgnoreCase(absl::string_view piece1,
+ absl::string_view piece2) noexcept {
return (piece1.size() == piece2.size() &&
0 == absl::strings_internal::memcasecmp(piece1.data(), piece2.data(),
piece1.size()));
// memcasecmp uses absl::ascii_tolower().
}
-bool StartsWithIgnoreCase(absl::string_view text, absl::string_view prefix) {
+bool StartsWithIgnoreCase(absl::string_view text,
+ absl::string_view prefix) noexcept {
return (text.size() >= prefix.size()) &&
EqualsIgnoreCase(text.substr(0, prefix.size()), prefix);
}
-bool EndsWithIgnoreCase(absl::string_view text, absl::string_view suffix) {
+bool EndsWithIgnoreCase(absl::string_view text,
+ absl::string_view suffix) noexcept {
return (text.size() >= suffix.size()) &&
EqualsIgnoreCase(text.substr(text.size() - suffix.size()), suffix);
}
+ABSL_NAMESPACE_END
} // namespace absl