![]() |
Home | Libraries | People | FAQ | More |
Constructor.
url( core::string_view s);
This function constructs a URL from the string s
,
which must contain a valid URI or relative-ref
or else an exception is thrown. The new url retains ownership by allocating
a copy of the passed string.
[link url.ref.boost__urls__url.url `url`] u( "https://www.example.com" );
return [link url.ref.boost__urls__url.url `url`]( [link url.ref.boost__urls__parse_uri_reference `parse_uri_reference`]( s ).value() );
this->[link url.ref.boost__urls__url.buffer `buffer`]().data() != s.data()
Linear in s.size()
.
Calls to allocate may throw. Exceptions thrown on invalid input.
Type |
Thrown On |
---|---|
|
The input does not contain a valid url. |
Name |
Description |
---|---|
|
The string to parse. |
URI = [link url.ref.boost__urls__scheme `scheme`] ":" hier-part [ "?" [link url.ref.boost__urls__url.query `query`] ] [ "#" [link url.ref.boost__urls__url.fragment `fragment`] ] relative-[link url.ref.boost__urls__grammar__ref `ref`] = relative-part [ "?" [link url.ref.boost__urls__url.query `query`] ] [ "#" [link url.ref.boost__urls__url.fragment `fragment`] ]