boost::urls::url_base::set_encoded_zone_id
Set the zone ID for an IPv6 address (percent‐encoded).
Synopsis
Declared in <boost/url/url_base.hpp>
url_base&
set_encoded_zone_id(pct_string_view s);
Description
This function sets the zone ID for the host if the host is an IPv6 address. Escapes in the string are preserved, and reserved characters in the string are percent‐escaped in the result.
Example
assert( u.set_host_ipv6( ipv6_address( "fe80::1" ) ).set_encoded_zone_id( "eth0" ).buffer() == "https://[fe80::1%25eth0]" );
Exception Safety
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
Parameters
Name |
Description |
s |
The zone ID to set. |
Created with MrDocs