From 65f17cd3309e192dcf0d61d3d946a3610420a9d4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 17 Jun 2015 16:20:11 +0200 Subject: Support URLs in $NIX_PATH This didn't work (despite claims in the manual), because the colon in "http://" was parsed as a element separator. So handle "://" specially. --- src/libutil/util.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 6e20a22d9da8..187e05ece050 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -341,6 +341,11 @@ string chomp(const string & s); string trim(const string & s, const string & whitespace = " \n\r\t"); +/* Replace all occurrences of a string inside another string. */ +string replaceStrings(const std::string & s, + const std::string & from, const std::string & to); + + /* Convert the exit status of a child as returned by wait() into an error string. */ string statusToString(int status); -- cgit 1.4.1