Go to the documentation of this file.00001 #ifndef DDC_STRING_H
00002 #define DDC_STRING_H
00003
00004 #include "ddcConfig.h"
00005 #include "utf8xx.h"
00006 #include <stdio.h>
00007 #include <string>
00008
00009
00010
00011
00013 extern std::string escapeCString(const std::string &s);
00014
00016 extern std::string unescapeCString(const std::string &s);
00017
00018
00019
00020
00026 extern std::string escapeJsonString(const std::string &s, bool assume_utf8=true, bool add_quotes=false);
00027
00029 extern std::string unescapeJsonString(const std::string &s);
00030
00032 inline std::string jsonStr(const std::string &s, bool assume_utf8=true, bool add_quotes=true)
00033 {
00034 return escapeJsonString(s,assume_utf8,add_quotes);
00035 }
00036
00037
00038
00039
00041 extern std::string unescapeUtf8String(const std::string &s);
00042
00043
00044
00045 #endif