...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Set the port.
url& set_port_number( std::uint16_t n);
The port is set to the specified integer.
assert( url( "http://www.example.com" ).set_port_number( 8080 ).authority().buffer() == "www.example.com:8080" );
this->has_authority() == true && this->has_port() == true && this->port_number() == n
Linear in this->size()
.
Strong guarantee. Calls to allocate may throw.
Name |
Description |
---|---|
|
The port number to set. |
authority = [ userinfo "@" ] host [ ":" port ] port = *DIGIT
remove_port
,
/root/project/libs/url/include/boost/url/url.hpp