boost::urls::params_encoded_ref::set
Set a value
Synopsis
Declared in header <boost/url/params_encoded_ref.hpp>
iterator
set(
pct_string_view key,
pct_string_view value,
ignore_case_param ic = = {});
Description
This function performs one of two
actions depending on the value of
this->contains( key, ic )
.
-
If key is contained in the view then one of the matching params has its value changed to the specified value. The remaining params with a matching key are erased. Otherwise,
-
If
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. |
Parameters
Name | Description |
---|---|
key |
The key to match. By default, a case-sensitive comparison is used. |
value |
The value to assign. The
empty string still counts as a value.
That is, |
ic |
An optional parameter. If the value ignore_case is passed here, the comparison is case-insensitive. |