Boost.URL Logo

PrevUpHomeNext

pct_decode_bytes_unchecked

Return the number of bytes needed to hold the string with percent-decoding applied.

Synopsis

Defined in header <boost/url/pct_encoding.hpp>

std::size_t
pct_decode_bytes_unchecked(
    string_view s);
Description

This function calculates the number of bytes needed to apply percent-decoding to the encoded string s, excluding any null terminator. The caller is responsible for validating the input string before calling this function.

Example
std::size_t size = pct_decode_bytes_unchecked( "Program%20Files" );
assert( size == 13 );
Preconditions

The string s must contain a valid percent-encoding.

Exception Safety

Throws nothing.

Return Value

The number of bytes needed to apply percent-decoding, excluding any null terminator.

Parameters

Name

Description

s

The string to inspect.

See Also

validate_pct_encoding.

Convenience header <boost/url.hpp>


PrevUpHomeNext