diff --git a/src/util.cpp b/src/util.cpp index 40d803da7..7f0a0e5e6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -325,27 +325,6 @@ int execute ( // Collides with std::numeric_limits methods #undef max -//////////////////////////////////////////////////////////////////////////////// -// Escapes any unescaped character of type c within the given string -// e.g. ' ' -> '\ ' -const std::string escape (const std::string& value, char c) -{ - std::string modified = value; - char tmp[2] = {c, '\0'}; - std::string search = tmp; - std::string replace = "\\" + search; - - std::string::size_type pos = modified.find (search); - while (pos != std::string::npos) { - if ( modified[pos-1] != '\\' ) - modified.replace (pos, 1, replace); - - pos = modified.find (search, pos+1); - } - - return modified; -} - //////////////////////////////////////////////////////////////////////////////// // Accept a list of projects, and return an indented list // that reflects the hierarchy. diff --git a/src/util.h b/src/util.h index 1de12dc0c..b64035f60 100644 --- a/src/util.h +++ b/src/util.h @@ -61,8 +61,6 @@ int execute (const std::string&, const std::vector &, const std::st int flock (int, int); #endif -const std::string escape (const std::string&, char); - const std::vector indentTree ( const std::vector&, const std::string& whitespace = " ",