aboutsummaryrefslogtreecommitdiff
path: root/third_party/abseil-cpp/absl/strings/match.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/abseil-cpp/absl/strings/match.h')
-rw-r--r--third_party/abseil-cpp/absl/strings/match.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/third_party/abseil-cpp/absl/strings/match.h b/third_party/abseil-cpp/absl/strings/match.h
index 038cbb3fa8..90fca98ad2 100644
--- a/third_party/abseil-cpp/absl/strings/match.h
+++ b/third_party/abseil-cpp/absl/strings/match.h
@@ -43,20 +43,14 @@ ABSL_NAMESPACE_BEGIN
// StrContains()
//
// Returns whether a given string `haystack` contains the substring `needle`.
-inline bool StrContains(absl::string_view haystack,
- absl::string_view needle) noexcept {
+inline bool StrContains(absl::string_view haystack, absl::string_view needle) {
return haystack.find(needle, 0) != haystack.npos;
}
-inline bool StrContains(absl::string_view haystack, char needle) noexcept {
- return haystack.find(needle) != haystack.npos;
-}
-
// StartsWith()
//
// Returns whether a given string `text` begins with `prefix`.
-inline bool StartsWith(absl::string_view text,
- absl::string_view prefix) noexcept {
+inline bool StartsWith(absl::string_view text, absl::string_view prefix) {
return prefix.empty() ||
(text.size() >= prefix.size() &&
memcmp(text.data(), prefix.data(), prefix.size()) == 0);
@@ -65,8 +59,7 @@ inline bool StartsWith(absl::string_view text,
// EndsWith()
//
// Returns whether a given string `text` ends with `suffix`.
-inline bool EndsWith(absl::string_view text,
- absl::string_view suffix) noexcept {
+inline bool EndsWith(absl::string_view text, absl::string_view suffix) {
return suffix.empty() ||
(text.size() >= suffix.size() &&
memcmp(text.data() + (text.size() - suffix.size()), suffix.data(),
@@ -77,22 +70,19 @@ inline bool EndsWith(absl::string_view text,
//
// Returns whether given ASCII strings `piece1` and `piece2` are equal, ignoring
// case in the comparison.
-bool EqualsIgnoreCase(absl::string_view piece1,
- absl::string_view piece2) noexcept;
+bool EqualsIgnoreCase(absl::string_view piece1, absl::string_view piece2);
// StartsWithIgnoreCase()
//
// Returns whether a given ASCII string `text` starts with `prefix`,
// ignoring case in the comparison.
-bool StartsWithIgnoreCase(absl::string_view text,
- absl::string_view prefix) noexcept;
+bool StartsWithIgnoreCase(absl::string_view text, absl::string_view prefix);
// EndsWithIgnoreCase()
//
// Returns whether a given ASCII string `text` ends with `suffix`, ignoring
// case in the comparison.
-bool EndsWithIgnoreCase(absl::string_view text,
- absl::string_view suffix) noexcept;
+bool EndsWithIgnoreCase(absl::string_view text, absl::string_view suffix);
ABSL_NAMESPACE_END
} // namespace absl