:relfileprefix: ../../../ [#95CB57BBC1484C95A0D3E63EC9956DE62BFB4033] = Function url_view_base::port_number pass:v,q[Return the port] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- uint16_t port_number() const noexcept; ---- == Description pass:v,q[If a port is present and the numerical] pass:v,q[value is representable, it is returned] pass:v,q[as an unsigned integer. Otherwise, the] pass:v,q[number zero is returned.] === Example [,cpp] ---- assert( url_view( "http://localhost.com:8080" ).port_number() == 8080 ); ---- === Complexity pass:v,q[Constant.] === Exception Safety pass:v,q[Throws nothing.] === BNF [,cpp] ---- port = *DIGIT ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.3[3.2.3. Port (rfc3986)] == Return Value * `uint16_t`