Home | Libraries | People | FAQ | More |
Set a value.
iterator set( pct_string_view key, pct_string_view value, ignore_case_param ic = {});
This function performs one of two actions depending on the value of
this->contains(
key,
ic )
.
key
is not contained
in the view, then the function apppends the param {
key,
value }
.
All iterators are invalidated.
The strings passed in must not come from the element being replaced, or else the behavior is undefined.
url u( "?id=42&id=69" ); u.encoded_params().set( "id", "none" ); assert( u.encoded_params().count( "id" ) == 1 );
this->count( key, ic ) == 1 && this->find( key, ic )->value == value
Linear in this->url().encoded_query().size()
.
Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.
Type |
Thrown On |
---|---|
|
|
An iterator to the appended or modified element.
Name |
Description |
---|---|
|
The key to match. By default, a case-sensitive comparison is used. |
|
The value to assign. The empty string still counts as a value.
That is, |
|
An optional parameter. If the value |