Return the buffer size needed for percent-decoding
Declared in <boost/url/decode.hpp>
system::result<std::size_t>
decoded_size(core::string_view s) noexcept;
This function returns the exact number of bytes needed to store the decoded form of the specified string using the given options. The string is validated before the size is computed; malformed escapes cause the returned result to contain an error instead.
auto n = decoded_size( "My%20Stuff" );
assert( n && *n == 8 );
Throws nothing. Validation errors are reported in the returned result.
A result containing the decoded size, excluding any null terminator.
| Name | Description |
|---|---|
| s | The string to measure. |