! * @brief string escaping as described in RFC 6901 (Sect. 4) * @param[in] s string to escape * @return escaped string * * Note the order of escaping "~" to "~0" and "/" to "~1" is important. */
| 2672 | * Note the order of escaping "~" to "~0" and "/" to "~1" is important. |
| 2673 | */ |
| 2674 | inline std::string escape(std::string s) |
| 2675 | { |
| 2676 | replace_substring(s, "~", "~0"); |
| 2677 | replace_substring(s, "/", "~1"); |
| 2678 | return s; |
| 2679 | } |
| 2680 | |
| 2681 | /*! |
| 2682 | * @brief string unescaping as described in RFC 6901 (Sect. 4) |
no test coverage detected