Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
static_url::remove_authority

Remove the authority.

Synopsis
static_url&
remove_authority();
Description

This function removes the authority, which includes the userinfo, host, and a port if present.

Example
assert( url( "http://example.com/echo.cgi" ).[link url.ref.boost__urls__static_url.remove_authority `remove_authority`]().[link url.ref.boost__urls__static_url.buffer `buffer`]() == "http:/echo.cgi" );
Postconditions
this->[link url.ref.boost__urls__static_url.has_authority `has_authority`]() == false && this->[link url.ref.boost__urls__static_url.has_userinfo `has_userinfo`]() == false && this->[link url.ref.boost__urls__static_url.has_port `has_port`]() == false
Complexity

Linear in this->size().

Exception Safety

Throws nothing.

BNF
[link url.ref.boost__urls__static_url.authority `authority`]     = [ [link url.ref.boost__urls__static_url.userinfo `userinfo`] "@" ] [link url.ref.boost__urls__static_url.host `host`] [ ":" [link url.ref.boost__urls__static_url.port `port`] ]

[link url.ref.boost__urls__static_url.userinfo `userinfo`]      = *( unreserved / pct-encoded / sub-delims / ":" )
[link url.ref.boost__urls__static_url.host `host`]          = IP-literal / IPv4address / reg-[link url.ref.boost__urls__host_type `name`]
[link url.ref.boost__urls__static_url.port `port`]          = *DIGIT
Specification
See Also

/root/project/libs/url/include/boost/url/static_url.hpp


PrevUpHomeNext