[#5B0D38BCB03693B07072DBB235E3F72B0A0DAF83]

Function url_view_base:: encoded_authority

Return the authority.

Synopsis

            pct_string_view
encoded_authority() const noexcept;
        

Description

If present, this function returns a string representing the authority (which may be empty). Otherwise it returns an empty string. The returned string may contain percent escapes.

Example

assert( url_view( "file://Network%20Drive/My%2DFiles" ).encoded_authority() == "Network%20Drive" );

Complexity

Constant.

Exception Safety

Throws nothing.

BNF

authority = [ userinfo "@" ] host [ ":" port ]

Specification

  • 3.2. Authority (rfc3986)