summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-06-22 14:21:08 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-06-22 14:21:08 (GMT)
commitb977136904223e1763414527683ff4a4891a5549 (patch)
tree9db1c1eddda9b0d36fb22ec6e5245dc64026ffd6 /Source/cmSystemTools.cxx
parent348d1994ac14f4812e287abbfde95b731a801745 (diff)
downloadCMake-b977136904223e1763414527683ff4a4891a5549.zip
CMake-b977136904223e1763414527683ff4a4891a5549.tar.gz
CMake-b977136904223e1763414527683ff4a4891a5549.tar.bz2
added escape quote method
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index de181f0..c05238a 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -321,6 +321,19 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
#endif
}
+std::string cmSystemTools::EscapeQuotes(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)