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::port

Return the port.

Synopsis
string_view
port() const;
Description

If present, this function returns a string representing the port (which may be empty). Otherwise it returns an empty string.

Example
assert( url_view( "http://localhost.com:8080" ).port() == "8080" );
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
port        = *DIGIT
Specification
See Also

encoded_host_and_port, has_port, port_number.


PrevUpHomeNext