[#boost-urls-url-set_encoded_zone_id-04] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url.adoc[url]::set_encoded_zone_id :relfileprefix: ../../../ :mrdocs: Set the zone ID for an IPv6 address (percent‐encoded). == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url.hpp#L456[boost/url/url.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/url.adoc[url]& set_encoded_zone_id(xref:boost/urls/pct_string_view.adoc[pct_string_view] const& 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 [,cpp] ---- assert( u.set_host_ipv6( ipv6_address( "fe80::1" ) ).set_encoded_zone_id( "eth0" ).buffer() == "https://[fe80::1%25eth0]" ); ---- == Complexity Linear in `this‐>size()`. == Exception Safety Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input. == Specification * https://datatracker.ietf.org/doc/html/rfc6874[] == Return Value `*this` == Parameters [cols=2] |=== | Name | Description | *s* | The zone ID to set. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#