mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
parent
14d82baba4
commit
54bf5ba422
11 changed files with 67 additions and 43 deletions
|
@ -1186,7 +1186,7 @@ void _interrupted()
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
template<class C> C tokenizeString(const string & s, const string & separators)
|
||||
template<class C> C tokenizeString(std::string_view s, const string & separators)
|
||||
{
|
||||
C result;
|
||||
string::size_type pos = s.find_first_not_of(separators, 0);
|
||||
|
@ -1200,9 +1200,9 @@ template<class C> C tokenizeString(const string & s, const string & separators)
|
|||
return result;
|
||||
}
|
||||
|
||||
template Strings tokenizeString(const string & s, const string & separators);
|
||||
template StringSet tokenizeString(const string & s, const string & separators);
|
||||
template vector<string> tokenizeString(const string & s, const string & separators);
|
||||
template Strings tokenizeString(std::string_view s, const string & separators);
|
||||
template StringSet tokenizeString(std::string_view s, const string & separators);
|
||||
template vector<string> tokenizeString(std::string_view s, const string & separators);
|
||||
|
||||
|
||||
string concatStringsSep(const string & sep, const Strings & ss)
|
||||
|
|
|
@ -340,7 +340,7 @@ MakeError(FormatError, Error);
|
|||
|
||||
|
||||
/* String tokenizer. */
|
||||
template<class C> C tokenizeString(const string & s, const string & separators = " \t\n\r");
|
||||
template<class C> C tokenizeString(std::string_view s, const string & separators = " \t\n\r");
|
||||
|
||||
|
||||
/* Concatenate the given strings with a separator between the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue