[#1D29EE576F75F55B5F2E430D0788BEB76AD7E818]

Function pct_string_view:: decode

Return the string with percent-decoding

Synopsis

            template
StringToken::result_type
decode(
    encoding_opts opt = = {},
    StringToken&& token) const;
        

Description

This function converts percent escapes in the string into ordinary characters and returns the result. When called with no arguments, the return type is `std::string`. Otherwise, the return type and style of output is determined by which string token is passed.

Example

assert( pct_string_view( "Program%20Files" ).decode() == "Program Files" );

Complexity

Linear in `this->size()`.

Exception Safety

Calls to allocate may throw. String tokens may throw exceptions.