MCPcopy Create free account
hub / github.com/bitfieldaudio/OTTO / escape

Method escape

external/include/json.hpp:7214–7219  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

7212
7213 /// escape "~"" to "~0" and "/" to "~1"
7214 static std::string escape(std::string s)
7215 {
7216 replace_substring(s, "~", "~0");
7217 replace_substring(s, "/", "~1");
7218 return s;
7219 }
7220
7221 /// unescape "~1" to tilde and "~0" to slash (order is important!)
7222 static void unescape(std::string& s)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected