refactor(3p/nix): Replace tokenizeStrings with absl::StrSplit

This function was a custom (and inefficient in the case of
single-character delimiters) string splitter which was used all over
the codebase. Abseil provides an appropriate replacement function.
This commit is contained in:
Vincent Ambo 2020-05-25 15:54:14 +01:00
parent b99b368d17
commit bf452cbc2a
29 changed files with 146 additions and 145 deletions

View file

@ -56,7 +56,7 @@ Path canonPath(const Path& path, bool resolveSymlinks = false);
everything before the final `/'. If the path is the root or an
immediate child thereof (e.g., `/foo'), this means an empty string
is returned. */
Path dirOf(const Path& path);
Path dirOf(absl::string_view path);
/* Return the base name of the given canonical path, i.e., everything
following the final `/'. */
@ -316,11 +316,6 @@ MakeError(Interrupted, BaseError);
MakeError(FormatError, Error);
/* String tokenizer. */
template <class C>
C tokenizeString(const std::string& s,
const std::string& separators = " \t\n\r");
/* Concatenate the given strings with a separator between the
elements. */
std::string concatStringsSep(const std::string& sep, const Strings& ss);