MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / escape

Function escape

native/thirdpart/json/json.hpp:10937–10942  ·  view source on GitHub ↗

escape "~" to "~0" and "/" to "~1"

Source from the content-addressed store, hash-verified

10935
10936 /// escape "~" to "~0" and "/" to "~1"
10937 static std::string escape(std::string s)
10938 {
10939 replace_substring(s, "~", "~0");
10940 replace_substring(s, "/", "~1");
10941 return s;
10942 }
10943
10944 /// unescape "~1" to tilde and "~0" to slash (order is important!)
10945 static void unescape(std::string& s)

Callers 3

to_stringMethod · 0.85
flattenFunction · 0.85
basic_json diffFunction · 0.85

Calls 1

replace_substringFunction · 0.85

Tested by

no test coverage detected