![]() |
Home | Libraries | People | FAQ | More |
Rule for a string with percent-encoded escapes.
Defined in header <boost/url/rfc/pct_encoded_rule.hpp>
template< class CharSet> constexpr implementation-defined pct_encoded_rule( CharSet const& cs);
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 = [link url.ref.boost__urls__pct_string_view `pct_string_view`];
Rules are used with the function grammar::parse
.
// pchar = unreserved / pct-encoded / sub-delims / ":" / "@" system::result< pct_string_view > rv = [link url.ref.boost__urls__grammar__parse `grammar::parse`]( "Program%20Files" , [link url.ref.boost__urls__pct_encoded_rule `pct_encoded_rule`]( [link url.ref.boost__urls__pchars `pchars`] ) );
pct-encoded = "%" HEXDIG HEXDIG
Name |
Description |
---|---|
|
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. |
grammar::parse
,
pchars
,
pct_string_view
.
Convenience header <boost/url.hpp>