[llvm-commits] CVS: llvm/include/llvm/ADT/StringExtras.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jul 14 15:54:18 PDT 2006
Changes in directory llvm/include/llvm/ADT:
StringExtras.h updated: 1.33 -> 1.34
---
Log message:
Add two helper functions
---
Diffs of the changes: (+9 -0)
StringExtras.h | 9 +++++++++
1 files changed, 9 insertions(+)
Index: llvm/include/llvm/ADT/StringExtras.h
diff -u llvm/include/llvm/ADT/StringExtras.h:1.33 llvm/include/llvm/ADT/StringExtras.h:1.34
--- llvm/include/llvm/ADT/StringExtras.h:1.33 Thu Jun 1 02:03:53 2006
+++ llvm/include/llvm/ADT/StringExtras.h Fri Jul 14 17:54:06 2006
@@ -129,6 +129,15 @@
std::string getToken(std::string &Source,
const char *Delimiters = " \t\n\v\f\r");
+/// UnescapeString - Modify the argument string, turning two character sequences
+/// like '\\' 'n' into '\n'. This handles: \e \a \b \f \n \r \t \v \' \\ and
+/// \num (where num is a 1-3 byte octal value).
+void UnescapeString(std::string &Str);
+
+/// EscapeString - Modify the argument string, turning '\\' and anything that
+/// doesn't satisfy std::isprint into an escape sequence.
+void EscapeString(std::string &Str);
+
} // End llvm namespace
#endif
More information about the llvm-commits
mailing list