diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T01·19+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T01·19+0100 |
commit | b99b368d17f2e806a61f7abb83c6d3a9e4bbdc38 (patch) | |
tree | 1f76047dd027421dcf79cdf4804fa5ff1bb08b2b /third_party/nix/src/libutil/util.cc | |
parent | 8cf1322a6fd5ae282d8a09fdba634f27a1a88560 (diff) |
refactor(3p/nix/libutil): Replace hasPrefix/Suffix with Abseil r/845
Uses the equivalent absl::StartsWith and absl::EndsWith functions instead.
Diffstat (limited to 'third_party/nix/src/libutil/util.cc')
-rw-r--r-- | third_party/nix/src/libutil/util.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/third_party/nix/src/libutil/util.cc b/third_party/nix/src/libutil/util.cc index 8dca97af98a0..fb9c6bfd5270 100644 --- a/third_party/nix/src/libutil/util.cc +++ b/third_party/nix/src/libutil/util.cc @@ -1255,15 +1255,6 @@ bool statusOk(int status) { return WIFEXITED(status) && WEXITSTATUS(status) == 0; } -bool hasPrefix(const std::string& s, const std::string& prefix) { - return s.compare(0, prefix.size(), prefix) == 0; -} - -bool hasSuffix(const std::string& s, const std::string& suffix) { - return s.size() >= suffix.size() && - std::string(s, s.size() - suffix.size()) == suffix; -} - std::string toLower(const std::string& s) { std::string r(s); for (auto& c : r) { |