MCPcopy Create free account
hub / github.com/catboost/catboost / JsonEscape

Function JsonEscape

tools/enum_parser/enum_parser/main.cpp:51–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static inline void JsonEscape(TString& s) {
52 SubstGlobal(s, "\\", "\\\\");
53 SubstGlobal(s, "\"", "\\\"");
54 SubstGlobal(s, "\r", "\\r");
55 SubstGlobal(s, "\n", "\\n");
56 SubstGlobal(s, "\t", "\\t");
57}
58
59static inline TString JsonQuote(const TString& s) {
60 TString quoted = s;

Callers 1

JsonQuoteFunction · 0.85

Calls 1

SubstGlobalFunction · 0.50

Tested by

no test coverage detected