parse_authority
Parse an authority
Synopsis
result<authority_view>
parse_authority(string_view s) noexcept;
Declared in file <include/boost/url/authority_view.hpp> on line 1432
Defined in file <src/authority_view.cpp> on line 337
Description
This function parses a string according to the authority grammar below, and returns an authority_view referencing the string. Ownership of the string is not transferred; the caller is responsible for ensuring that the lifetime of the string extends until the view is no longer being accessed.
BNF
authority = [ userinfo "@" ] host [ ":" port ]
userinfo = user [ ":" [ password ] ]
user = *( unreserved / pct-encoded / sub-delims )
password = *( unreserved / pct-encoded / sub-delims / ":" )
host = IP-literal / IPv4address / reg-name
port = *DIGIT