Function URI::Template::PctEncode¶
Defined in File Expander.h
Function Documentation¶
-
std::string
URI::Template
::
PctEncode
(const std::string &value, bool allow_reserved = false, std::size_t max_len = std::numeric_limits<size_t>::max())¶ Performs percent-encoding of the string.
Will percent-encode incoming
value
. Ifallow_reserved
is true then the characters from reserved (as per https://tools.ietf.org/html/rfc6570#section-1.5) are not encoded. This function is idempotent, means that already encoded triplets invalue
will not be encoded twice.- Parameters
[in] value – A value to encode.
[in] allow_reserved – If reserved characters are allowed in the result.
[in] max_len – Maximum length of the result. Encoded triplets are counted as single character.
- Returns
A percent-encoded representation of the
value
.