#include "../common/ddcString.h"
#include "../common/utilit.h"
string escapeCString | ( | const std::string & | s | ) |
Encode C escapes into string; encodes byte-wise with escapes
References Format().
string unescapeCString | ( | const string & | s | ) |
References u8_wc_toutf8().
Referenced by CConcIndexator::LoadOptionsFromString(), and yyqparse().
std::string escapeJsonString | ( | const std::string & | s, | |
bool | assume_utf8 = true , |
|||
bool | add_quotes = false | |||
) |
Encode JSON escapes into string.
assume_utf8
is true (default), leaves bytes with high-bit set alone; otherwise encodes them as escapes. add_quotes
is true, the returned string will be wrapped in JSON-friendly double quotes ("") References Format().
Referenced by jsonStr().
string unescapeJsonString | ( | const string & | s | ) |
string unescapeUtf8String | ( | const string & | s | ) |
References u8_wc_toutf8().
Referenced by yyqparse().