diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2017-10-30T14·56-0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30T14·56-0400 |
commit | 200b5a7cb0fb256ab47c933b3150aed91d9d3470 (patch) | |
tree | 300713d880c593eb36cc6cea4bc8d1073bb03112 /absl/strings/match.h | |
parent | d5134a7f11e32d11caa67e75ae2ae2e506fb54ba (diff) | |
parent | 0fece732a21c5ae8fef5fa8b3f0b8487bca68d83 (diff) |
Merge branch 'master' into master
Diffstat (limited to 'absl/strings/match.h')
-rw-r--r-- | absl/strings/match.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/absl/strings/match.h b/absl/strings/match.h index 4ac35f192e00..3d54da81d5f0 100644 --- a/absl/strings/match.h +++ b/absl/strings/match.h @@ -53,7 +53,7 @@ inline bool StrContains(absl::string_view haystack, absl::string_view needle) { 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); + memcmp(text.data(), prefix.data(), prefix.size()) == 0); } // EndsWith() @@ -63,7 +63,8 @@ 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(), - suffix.size()) == 0); + suffix.size()) == 0 + ); } // StartsWithIgnoreCase() |