Functions

ddcString.cpp File Reference

#include "../common/ddcString.h"
#include "../common/utilit.h"
Include dependency graph for ddcString.cpp:

Functions


Function Documentation

string escapeCString ( const std::string &  s  ) 

Encode C escapes into string; encodes byte-wise with escapes

References Format().

Here is the call graph for this function:

string unescapeCString ( const string &  s  ) 

References u8_wc_toutf8().

Referenced by CConcIndexator::LoadOptionsFromString(), and yyqparse().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string escapeJsonString ( const std::string &  s,
bool  assume_utf8 = true,
bool  add_quotes = false 
)

Encode JSON escapes into string.

  • If assume_utf8 is true (default), leaves bytes with high-bit set alone; otherwise encodes them as escapes.
  • If add_quotes is true, the returned string will be wrapped in JSON-friendly double quotes ("")

References Format().

Referenced by jsonStr().

Here is the call graph for this function:

Here is the caller graph for this function:

string unescapeJsonString ( const string &  s  ) 

References u8_wc_toutf8().

Here is the call graph for this function:

string unescapeUtf8String ( const string &  s  ) 

References u8_wc_toutf8().

Referenced by yyqparse().

Here is the call graph for this function:

Here is the caller graph for this function: