...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Set the user.
static_url& set_user( core::string_view s);
This function sets the user part of the userinfo to the string. Any special or reserved characters in the string are automatically percent-encoded.
assert( url().set_user( "john doe" ).encoded_userinfo() == "john%20doe" );
this->has_authority() == true && this->has_userinfo() == true
Linear in this->size() + s.size()
.
Strong guarantee. Calls to allocate may throw.
Name |
Description |
---|---|
|
The string to set. |
userinfo = [ [ user ] [ ':' password ] ] user = *( unreserved / pct-encoded / sub-delims ) password = *( unreserved / pct-encoded / sub-delims / ":" )
remove_password
, set_encoded_password
, set_encoded_user
, /root/project/libs/url/include/boost/url/static_url.hpp