![]() |
Home | Libraries | People | FAQ | More |
(Inherited from url_base
)
Set the scheme.
url_base& set_scheme( core::string_view s);
The scheme is set to the specified string, which must contain a valid scheme without any trailing colon (':'). Note that schemes are case-insensitive, and the canonical form is lowercased.
assert( [link url.ref.boost__urls__url_base.url `url`]( "http://www.example.com" ).[link url.ref.boost__urls__static_url_base.set_scheme `set_scheme`]( "https" ).[link url.ref.boost__urls__static_url_base.scheme_id `scheme_id`]() == [link url.ref.boost__urls__scheme `scheme::https`] );
Linear in this->size() + s.size()
.
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
Type |
Thrown On |
---|---|
|
|
Name |
Description |
---|---|
|
The scheme to set. |
[link url.ref.boost__urls__static_url_base.scheme `scheme`] = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )