Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
url_view_base::encoded_authority

Return the authority.

Synopsis
pct_string_view
encoded_authority() const;
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( [link url.ref.boost__urls__url_view_base.url_view `url_view`]( "file://Network%20Drive/My%2DFiles" ).[link url.ref.boost__urls__url_view_base.encoded_authority `encoded_authority`]() == "Network%20Drive" );
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
[link url.ref.boost__urls__url_view_base.authority `authority`]   = [ [link url.ref.boost__urls__url_view_base.userinfo `userinfo`] "@" ] [link url.ref.boost__urls__url_view_base.host `host`] [ ":" [link url.ref.boost__urls__url_view_base.port `port`] ]
Specification
See Also

authority, has_authority.


PrevUpHomeNext