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.
assert( u.set_host_ipv6( ipv6_address( "fe80::1" ) ).set_encoded_zone_id( "eth0" ).buffer() == "https://[fe80::1%25eth0]" );
Linear in this->size()
.
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
*this
Name | Description |
---|---|
s | The zone ID to set. |