File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace detail
1515{
1616
1717/* !
18- * @brief Out Of Place string escaping as described in RFC 6901 (Sect. 4)
18+ * @brief Returns a copy of a string escaped as described in RFC 6901 (Sect. 4)
1919 * @param[in] s string to escape
2020 * @return escaped string
2121 *
@@ -45,11 +45,13 @@ inline StringType escape(StringType const& s)
4545 {
4646 if (ch == CharT (' ~' ))
4747 {
48- res.append (StringType{" ~0" });
48+ res.push_back (CharT (' ~' ));
49+ res.push_back (CharT{' 0' });
4950 }
5051 else if (ch == CharT (' /' ))
5152 {
52- res.append (StringType{" ~1" });
53+ res.push_back (CharT{' ~' });
54+ res.push_back (CharT{' 1' });
5355 }
5456 else
5557 {
@@ -61,7 +63,7 @@ inline StringType escape(StringType const& s)
6163}
6264
6365/* !
64- * @brief In Place string unescaping as described in RFC 6901 (Sect. 4)
66+ * @brief Unescapes a string as described in RFC 6901 (Sect. 4), in-place
6567 * @param[in] s string to unescape
6668 *
6769 */
You can’t perform that action at this time.
0 commit comments