boost::urls::pct_encoded_rule

Rule for a string with percent-encoded escapes

Synopsis

Declared in <include/boost/url/rfc/pct_encoded_rule.hpp>

template<class CharSet>
constexpr
    _implementation-defined_
pct_encoded_rule(CharSet const& cs) noexcept;

Description

This function returns a rule which matches a percent-encoded string, permitting characters in the string which are also in the specified character set to be used unescaped.

using value_type = pct_string_view;

Rules are used with the function

grammar::parse .

// pchar = unreserved / pct-encoded / sub-delims / ":" / "@" system::result< pct_string_view > rv = grammar::parse( "Program%20Files", pct_encoded_rule( pchars ) ); pct-encoded = "%" HEXDIG HEXDIG
  • 2.1. Percent-Encoding (rfc3986)
  • Parameters

    Name Description
    cs

    The character set indicating which characters are allowed without escapes. Any character which is not in this set must be escaped, or else parsing returns an error.

    See Also

    grammar::parse , pchars , pct_string_view .

    Created with MrDocs