refactor(3p/nix/libutil): Replace chomp() with absl::strings

This commit is contained in:
Vincent Ambo 2020-05-24 01:36:11 +01:00
parent 10481d2586
commit 06d7b4aebd
15 changed files with 40 additions and 26 deletions

View file

@ -5,6 +5,7 @@
#include <sstream>
#include <vector>
#include <absl/strings/ascii.h>
#include <glog/logging.h>
#include "affinity.hh"
@ -121,7 +122,7 @@ static void _main(int argc, char** argv) {
}
args.clear();
for (auto line : lines) {
line = chomp(line);
line = absl::StripTrailingAsciiWhitespace(line);
std::smatch match;
if (std::regex_match(line, match,
std::regex("^#!\\s*nix-shell (.*)$"))) {