:relfileprefix: ../../../ [#ACDEA9F7F68B0112FD4BD827D3693E33E8F6D6AF] = Function url_view_base::zone_id pass:v,q[Return the IPv6 Zone ID] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- template StringToken::result_type zone_id(StringToken&& token) const; ---- == Description pass:v,q[If the host type is] xref:boost/urls/host_type/ipv6.adoc[host_type::ipv6,] pass:v,q[this function returns the Zone ID as] pass:v,q[a string. Otherwise an empty string is returned.] pass:v,q[Any percent-escapes in the string are] pass:v,q[decoded first.] === Example [,cpp] ---- assert( url_view( "http://[fe80::1%25eth0]/" ).zone_id() == "eth0" ); ---- === Complexity pass:v,q[Linear in `this->encoded_zone_id().size()`.] === Exception Safety pass:v,q[Calls to allocate may throw.] === BNF [,cpp] ---- host = IP-literal / IPv4address / reg-name IP-literal = "[" ( IPv6address / IPv6addrz / IPvFuture ) "]" ZoneID = 1*( unreserved / pct-encoded ) IPv6addrz = IPv6address "%25" ZoneID ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc6874[Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers] == Return Value * `result_type` == Parameters |=== | Name | Type | *token* | `` |===