MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / escape

Function escape

extern/json/json.hpp:2977–2982  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2975 */
2976template<typename StringType>
2977inline StringType escape(StringType s)
2978{
2979 replace_substring(s, StringType{"~"}, StringType{"~0"});
2980 replace_substring(s, StringType{"/"}, StringType{"~1"});
2981 return s;
2982}
2983
2984/*!
2985 * @brief string unescaping as described in RFC 6901 (Sect. 4)

Callers 5

visitCharMethod · 0.85
diagnosticsMethod · 0.85
to_stringFunction · 0.85
json.hppFile · 0.85
basic_json diffFunction · 0.85

Calls 1

replace_substringFunction · 0.85

Tested by

no test coverage detected