[#boost-urls-static_url-set_zone_id] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/static_url.adoc[static_url]::set_zone_id :relfileprefix: ../../../ :mrdocs: Set the zone ID for an IPv6 address. == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/static_url.hpp#L388[boost/url/static_url.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/static_url.adoc[static_url]& set_zone_id(core::string_view s); ---- == Description This function sets the zone ID for the host if the host is an IPv6 address. Reserved characters in the string are percent‐escaped in the result. == Example [,cpp] ---- assert( u.set_host_ipv6( ipv6_address( "fe80::1" ) ).set_zone_id( "eth0" ).buffer() == "https://[fe80::1%25eth0]" ); ---- == Complexity Linear in `this‐>size()`. == Exception Safety Strong guarantee. Calls to allocate may throw. == 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]#