Add two helper functions
authorChris Lattner <sabre@nondot.org>
Fri, 14 Jul 2006 22:54:06 +0000 (22:54 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 14 Jul 2006 22:54:06 +0000 (22:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29150 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/StringExtras.h

index 066594e0650a2c411904e4ff7e035f4b105442b9..16132cd8807481df15f64bbf432af78bb590bac3 100644 (file)
@@ -129,6 +129,15 @@ static inline bool StringsEqualNoCase(const std::string &LHS,
 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