escape "~" to "~0" and "/" to "~1"
| 12360 | |
| 12361 | /// escape "~" to "~0" and "/" to "~1" |
| 12362 | static std::string escape(std::string s) |
| 12363 | { |
| 12364 | replace_substring(s, "~", "~0"); |
| 12365 | replace_substring(s, "/", "~1"); |
| 12366 | return s; |
| 12367 | } |
| 12368 | |
| 12369 | /// unescape "~1" to tilde and "~0" to slash (order is important!) |
| 12370 | static void unescape(std::string& s) |
no test coverage detected