Apply percent-decoding to a string.
Defined in header <boost/url/pct_encoding.hpp>
std::size_t pct_decode_unchecked( char* dest, char const* end, string_view s, pct_decode_opts const& opt = {});
This function applies percent-decoding to the input string, without performing any checking to ensure that the input string is valid. The contents of the output buffer will never be left undefined, regardless of input.
char *dest = new char[MAX_LENGTH]; std::size_t decoded_size = pct_decode_unchecked( dest, dest + MAX_LENGTH, "Program%20Files" ); assert( decoded_size == 13 ); assert( strncmp("Program Files", dest, decoded_size) == 0 );
Throws nothing.
The number of bytes written to the destination.
Name |
Description |
---|---|
|
A pointer to the beginning of the output buffer to hold the percent-decoded characters. |
|
A pointer to one past the end of the output buffer. |
|
The string to apply percent-decoding to. |
|
Optional settings for applying the decoding. If this parameter is omitted, default settings are used. |
Convenience header <boost/url.hpp>