Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
url::encoded_zone_id

Return the IPv6 Zone ID.

Synopsis
pct_string_view
encoded_zone_id() const;
Description

If the host type is host_type::ipv6, this function returns the Zone ID as a string. Otherwise an empty string is returned. The returned string may contain percent escapes.

Example
assert( url_view( "http://[fe80::1%25eth0]/" ).encoded_zone_id() == "eth0" );
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
host        = IP-literal / IPv4address / reg-name

IP-literal = "[" ( IPv6address / IPv6addrz / IPvFuture  ) "]"

ZoneID = 1*( unreserved / pct-encoded )

IPv6addrz = IPv6address "%25" ZoneID
Specification

PrevUpHomeNext