![]() |
Home | Libraries | People | FAQ | More |
(Inherited from url_base
)
Set the user.
url_base& set_encoded_user( pct_string_view s);
This function sets the user part of the userinfo the the string, which may contain percent-escapes. Escapes in the string are preserved, and reserved characters in the string are percent-escaped in the result.
assert( [link url.ref.boost__urls__url_base.url `url`]().[link url.ref.boost__urls__static_url_base.set_encoded_user `set_encoded_user`]( "john%20doe" ).[link url.ref.boost__urls__static_url_base.userinfo `userinfo`]() == "john doe" );
this->[link url.ref.boost__urls__static_url_base.has_authority `has_authority`]() == true && this->[link url.ref.boost__urls__static_url_base.has_userinfo `has_userinfo`]() == true
Linear in this->size() + s.size()
.
Strong guarantee. Calls to allocate may throw.
Type |
Thrown On |
---|---|
|
|
Name |
Description |
---|---|
|
The string to set. |
[link url.ref.boost__urls__static_url_base.userinfo `userinfo`] = [ [ [link url.ref.boost__urls__static_url_base.user `user`] ] [ ':' [link url.ref.boost__urls__static_url_base.password `password`] ] ] [link url.ref.boost__urls__static_url_base.user `user`] = *( unreserved / pct-encoded / sub-delims ) [link url.ref.boost__urls__static_url_base.password `password`] = *( unreserved / pct-encoded / sub-delims / ":" )
remove_password
, set_encoded_password
, set_password
, set_user
.