:relfileprefix: ../../../ [#A18C2B9D77209613B8B65BE19312C67C50986C09] = Function url_view_base::encoded_user pass:v,q[Return the user] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/pct_string_view.adoc[pct_string_view] encoded_user() const noexcept; ---- == Description pass:v,q[If present, this function returns a] pass:v,q[string representing the user (which] pass:v,q[may be empty).] pass:v,q[Otherwise it returns an empty string.] pass:v,q[The returned string may contain] pass:v,q[percent escapes.] === Example [,cpp] ---- assert( url_view( "http://jane%2Ddoe:pass@example.com" ).encoded_user() == "jane%2Ddoe" ); ---- === Complexity pass:v,q[Constant.] === Exception Safety pass:v,q[Throws nothing.] === BNF [,cpp] ---- userinfo = user [ ":" [ password ] ] user = *( unreserved / pct-encoded / sub-delims ) password = *( unreserved / pct-encoded / sub-delims / ":" ) ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1[3.2.1. User Information (rfc3986)] == Return Value * `pct_string_view`