about summary refs log tree commit diff
path: root/third_party/nix/src/libutil
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-24T00·36+0100
committerVincent Ambo <tazjin@google.com>2020-05-24T01·13+0100
commit06d7b4aebd9e4a1a87f77fe59a8c08392318be5d (patch)
tree264bfbef18b5b93596d6eb805fc9e5647ddadb4b /third_party/nix/src/libutil
parent10481d25861f1c25b53cfbd8119199ef2e918f9f (diff)
refactor(3p/nix/libutil): Replace chomp() with absl::strings r/835
Diffstat (limited to 'third_party/nix/src/libutil')
-rw-r--r--third_party/nix/src/libutil/util.cc5
-rw-r--r--third_party/nix/src/libutil/util.hh3
2 files changed, 0 insertions, 8 deletions
diff --git a/third_party/nix/src/libutil/util.cc b/third_party/nix/src/libutil/util.cc
index 6076bdc3934b..53d037cf5801 100644
--- a/third_party/nix/src/libutil/util.cc
+++ b/third_party/nix/src/libutil/util.cc
@@ -1210,11 +1210,6 @@ string concatStringsSep(const string& sep, const StringSet& ss) {
   return s;
 }
 
-string chomp(const string& s) {
-  size_t i = s.find_last_not_of(" \n\r\t");
-  return i == string::npos ? "" : string(s, 0, i + 1);
-}
-
 string trim(const string& s, const string& whitespace) {
   auto i = s.find_first_not_of(whitespace);
   if (i == string::npos) {
diff --git a/third_party/nix/src/libutil/util.hh b/third_party/nix/src/libutil/util.hh
index 5ce12f2ede43..3c8d4bd70c06 100644
--- a/third_party/nix/src/libutil/util.hh
+++ b/third_party/nix/src/libutil/util.hh
@@ -324,9 +324,6 @@ MakeError(Interrupted, BaseError)
 string concatStringsSep(const string& sep, const Strings& ss);
 string concatStringsSep(const string& sep, const StringSet& ss);
 
-/* Remove trailing whitespace from a string. */
-string chomp(const string& s);
-
 /* Remove whitespace from the start and end of a string. */
 string trim(const string& s, const string& whitespace = " \n\r\t");