TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ escape()

std::string nlohmann::detail::escape ( std::string  s)
inline

string escaping as described in RFC 6901 (Sect. 4)

Parameters
[in]sstring to escape
Returns
escaped string

Note the order of escaping "~" to "~0" and "/" to "~1" is important.

Definition at line 2558 of file json.hpp.

2559{
2560 replace_substring(s, "~", "~0");
2561 replace_substring(s, "/", "~1");
2562 return s;
2563}
void replace_substring(std::string &s, const std::string &f, const std::string &t)
replace all occurrences of a substring by another string
Definition: json.hpp:2539