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 a snapshot of the develop branch, built from commit 65ab21cc6f.
PrevUpHomeNext
static_url_base::remove_port

(Inherited from url_base)

Remove the port.

Synopsis
url_base&
remove_port();
Description

If a port exists, it is removed. The rest of the authority is unchanged.

Example
assert( url( "http://www.example.com:80" ).remove_port().authority().buffer() == "www.example.com" );
Postconditions
this->has_port() == false && this->port_number() == 0 && this->port() == ""
Complexity

Linear in this->size().

Exception Safety

Throws nothing.

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

port          = *DIGIT
Specification
See Also

set_port.


PrevUpHomeNext