[#93517234A5CCA4156DE867DBA08024B87ABEFF72]

Function authority_view:: port

Return the port

Synopsis

            core::string_view
port() const noexcept;
        

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

  • 3.2.3. Port (rfc3986)