diff options
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index a606bb4..957ee46 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -129,6 +129,22 @@ void cmSystemTools::ReplaceString(std::string& source, } } + +std::string cmSystemTools::EscapeSpaces(const char* str) +{ + std::string result = ""; + for(const char* ch = str; *ch != '\0'; ++ch) + { + if(*ch == ' ') + { + result += '\\'; + } + result += *ch; + } + return result; +} + + // return true if the file exists bool cmSystemTools::FileExists(const char* filename) { |