Add an element to the end.
void push_back( string_view s);
This function appends a segment containing the percent-encoded string
s
to the end of the container.
The percent-encoding must be valid or else an exception is thrown. All
end
iterators are invalidated.
url u = parse_relative_uri( "/path/to" ); u.segments().push_back( "file.txt" ); assert( u.encoded_path() == "/path/to/file.txt" );
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
Name |
Description |
---|---|
|
The string to add |
Type |
Thrown On |
---|---|
|
invalid percent-encoding |