diff options
author | Jens Heuschkel <heuschkel@tk.tu-darmstadt.de> | 2016-11-21 08:52:08 (GMT) |
---|---|---|
committer | Jens Heuschkel <heuschkel@tk.tu-darmstadt.de> | 2016-11-21 08:52:08 (GMT) |
commit | fbcece555ad648cabbbf168d0646c71ecef75fc3 (patch) | |
tree | 254a0e23b05176372f2a20b85183ddaaae7a27b9 /src/uscxml/util/String.cpp | |
parent | 67677c3ba75c487bc0f06ea6c683c5c187f8da17 (diff) | |
download | uscxml-fbcece555ad648cabbbf168d0646c71ecef75fc3.zip uscxml-fbcece555ad648cabbbf168d0646c71ecef75fc3.tar.gz uscxml-fbcece555ad648cabbbf168d0646c71ecef75fc3.tar.bz2 |
change function name according to convention; fix && problem
Diffstat (limited to 'src/uscxml/util/String.cpp')
-rw-r--r-- | src/uscxml/util/String.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/uscxml/util/String.cpp b/src/uscxml/util/String.cpp index 7c89230..24c7d42 100644 --- a/src/uscxml/util/String.cpp +++ b/src/uscxml/util/String.cpp @@ -25,11 +25,12 @@ namespace uscxml { #define ISWHITESPACE(char) (isspace(char)) -std::string macro_escaped(std::string const& s) { +std::string escapedMacro(std::string const& s) { + // inspired by http://stackoverflow.com/questions/2417588/escaping-a-c-string std::string returnValue=""; for (std::string::const_iterator iter = s.begin(), end = s.end(); iter != end; ++iter) { char c = *iter; - if (' ' <= c and c <= '~' and c != '\\' and c != '"') { + if (' ' <= c && c <= '~' && c != '\\' && c != '"') { returnValue += c; } else { |