escape "~" to "~0" and "/" to "~1"
| 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) |
no test coverage detected