:relfileprefix: ../../../ [#A1D3F279F3334BB451F12C583A478E156AC9582A] = Function url::remove_port pass:v,q[Remove the port] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/url.adoc[url]& remove_port() noexcept; ---- == Description pass:v,q[If a port exists, it is removed. The rest] pass:v,q[of the authority is unchanged.] === Example [,cpp] ---- assert( url( "http://www.example.com:80" ).remove_port().authority().buffer() == "www.example.com" ); ---- === Postconditions [,cpp] ---- this->has_port() == false && this->port_number() == 0 && this->port() == "" ---- === Complexity pass:v,q[Linear in `this->size()`.] === Exception Safety pass:v,q[Throws nothing.] === BNF [,cpp] ---- authority = [ userinfo "@" ] host [ ":" port ] port = *DIGIT ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.3[ 3.2.3. Port (rfc3986)] == Return Value * ``