about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-17T14·20+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-17T14·20+0200
commit65f17cd3309e192dcf0d61d3d946a3610420a9d4 (patch)
tree097a00551e14e44cf6715bcd75996992785d311f /src/libutil/util.hh
parent0d4d92fcf92030dbaad0f5251232657be218cc5d (diff)
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.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh5
1 files changed, 5 insertions, 0 deletions
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);