[#boost-urls-params_ref-set] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/params_ref.adoc[params_ref]::set :relfileprefix: ../../../ :mrdocs: Set a value == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/params_ref.hpp#L848[boost/url/params_ref.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/params_base/iterator.adoc[iterator] xref:boost/urls/params_ref/set-09.adoc[set]( xref:boost/urls/params_base/iterator.adoc[iterator] pos, core::string_view value); ---- [.small]#xref:boost/urls/params_ref/set-09.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/params_base/iterator.adoc[iterator] xref:boost/urls/params_ref/set-01.adoc[set]( core::string_view key, core::string_view value, xref:boost/urls/ignore_case_param.adoc[ignore_case_param] ic = {}); ---- [.small]#xref:boost/urls/params_ref/set-01.adoc[_» more..._]# == Description This function replaces the value of an element at the specified position. All iterators that are equal to `pos` or come after are invalidated. === Example [,cpp] ---- url u( "?id=42&id=69" ); u.params().set( u.params().begin(), "none" ); assert( u.encoded_query() == "id=none&id=69" ); ---- === Complexity Linear in `this‐>url().encoded_query().size()`. === Exception Safety Strong guarantee. Calls to allocate may throw. == Return Value An iterator to the element. == Parameters |=== | Name | Description | *pos* | An iterator to the element. | *value* | The value to assign. The empty string still counts as a value. That is, `has_value` for the element is true. | *key* | The key to match. By default, a case‐sensitive comparison is used. | *ic* | An optional parameter. If the value xref:boost/urls/ignore_case.adoc[ignore_case] is passed here, the comparison is case‐insensitive. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#