From acf3390ca28edf1438fa896602ffede2a7dff103 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 3 Dec 2020 11:09:28 -0800 Subject: Export of internal Abseil changes -- 8ebcdcac49f299156a8fd4a77501a258050960e8 by Evan Brown : In btree_iterator, refactor a bit and update a couple of comments. PiperOrigin-RevId: 345491436 -- 421d3b9b5cf484811b9514436ce83f797e109145 by CJ Johnson : Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor PiperOrigin-RevId: 345479151 -- 88f36a132b2038cb276ed1ad4d9764adb1fc78e6 by CJ Johnson : Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor PiperOrigin-RevId: 345433064 -- e55c9b4e7c578c1c4f2df65b1991041c283a97d9 by Chris Kennelly : Internal change PiperOrigin-RevId: 345388181 -- e2284c4e77ff1ebc3009e5bf520524c552226d8a by Chris Kennelly : Internal change PiperOrigin-RevId: 345357514 -- 1c496a2ae07ce98578614155d63ef2ea4de5e518 by Chris Kennelly : Mark string lookup functions noexcept. PiperOrigin-RevId: 345275012 GitOrigin-RevId: 8ebcdcac49f299156a8fd4a77501a258050960e8 Change-Id: I0ccb57d210b543270769e1378de38bf0922f8745 --- absl/strings/match.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'absl/strings/match.cc') 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); } -- cgit v1.2.3