boost::urls::decode

decode overloads

Synopses

Declared in <boost/url/decode.hpp>

Return a percent-decoded string

template<string_token::StringToken StringToken = string_token::return_string>
system::result<StringToken::result_type>
decode(
    core::string_view s,
    encoding_opts opt = {},
    StringToken&& token = {});
» more...

Apply percent-decoding to an arbitrary string

system::result<std::size_t>
decode(
    char* dest,
    std::size_t size,
    core::string_view s,
    encoding_opts opt = {}) noexcept;
» more...

Return Value

  • A result containing the decoded string in the format described by the passed string token.
  • The number of characters written to the destination buffer, or an error.

Parameters

NameDescription
sThe string to decode.
optThe decoding options. If omitted, the default options are used.
tokenA string token.
destThe destination buffer to write to.
sizeThe number of writable characters pointed to by dest. If this is less than the decoded size, the result is truncated.