summaryrefslogtreecommitdiff
path: root/absl/strings/match.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-12-03 11:09:28 -0800
committerGravatar Greg Falcon <gfalcon@google.com>2020-12-03 20:40:58 +0000
commitacf3390ca28edf1438fa896602ffede2a7dff103 (patch)
tree9ea833910de876aeb98dfbaff19e1a3766b34c93 /absl/strings/match.cc
parent592924480acf034aec0454160492a20bccdbdf3e (diff)
Export of internal Abseil changes
-- 8ebcdcac49f299156a8fd4a77501a258050960e8 by Evan Brown <ezb@google.com>: In btree_iterator, refactor a bit and update a couple of comments. PiperOrigin-RevId: 345491436 -- 421d3b9b5cf484811b9514436ce83f797e109145 by CJ Johnson <johnsoncj@google.com>: Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor PiperOrigin-RevId: 345479151 -- 88f36a132b2038cb276ed1ad4d9764adb1fc78e6 by CJ Johnson <johnsoncj@google.com>: Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor PiperOrigin-RevId: 345433064 -- e55c9b4e7c578c1c4f2df65b1991041c283a97d9 by Chris Kennelly <ckennelly@google.com>: Internal change PiperOrigin-RevId: 345388181 -- e2284c4e77ff1ebc3009e5bf520524c552226d8a by Chris Kennelly <ckennelly@google.com>: Internal change PiperOrigin-RevId: 345357514 -- 1c496a2ae07ce98578614155d63ef2ea4de5e518 by Chris Kennelly <ckennelly@google.com>: Mark string lookup functions noexcept. PiperOrigin-RevId: 345275012 GitOrigin-RevId: 8ebcdcac49f299156a8fd4a77501a258050960e8 Change-Id: I0ccb57d210b543270769e1378de38bf0922f8745
Diffstat (limited to 'absl/strings/match.cc')
-rw-r--r--absl/strings/match.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/absl/strings/match.cc b/absl/strings/match.cc
index 8127cb0c..2d672509 100644
--- a/absl/strings/match.cc
+++ b/absl/strings/match.cc
@@ -19,19 +19,22 @@
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);
}