[#boost-urls-decoded_size] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::decoded_size :relfileprefix: ../../ :mrdocs: Return the buffer size needed for percent‐decoding == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/decode.hpp#Lundefined[boost/url/decode.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- system::result<std::size_t> decoded_size(core::string_view s) noexcept; ---- == Description 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. == Example [,cpp] ---- auto n = decoded_size( "My%20Stuff" ); assert( n && *n == 8 ); ---- == Exception Safety Throws nothing. Validation errors are reported in the returned result. == Specification * https://datatracker.ietf.org/doc/html/rfc3986#section-2.1[2.1. Percent‐Encoding (rfc3986)] == Return Value A result containing the decoded size, excluding any null terminator. == Parameters [cols="1,4"] |=== |Name|Description | *s* | The string to measure. |=== == See Also xref:boost/urls/decode-01.adoc[`decode`], xref:boost/urls/encoding_opts.adoc[`encoding_opts`], xref:boost/urls/make_pct_string_view.adoc[`make_pct_string_view`]. [.small]#Created with https://www.mrdocs.com[MrDocs]#