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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
url::remove_authority

Remove the authority.

Synopsis
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" ).remove_authority().buffer() == "http:/echo.cgi" );
Postconditions
this->has_authority() == false && this->has_userinfo() == false && this->has_port() == false
Complexity

Linear in this->size().

Exception Safety

Throws nothing.

BNF
authority     = [ userinfo "@" ] host [ ":" port ]

userinfo      = *( unreserved / pct-encoded / sub-delims / ":" )
host          = IP-literal / IPv4address / reg-name
port          = *DIGIT
Specification
See Also

set_encoded_authority.


PrevUpHomeNext