:relfileprefix: ../../../ [#F28B9F260B53F7C9A88D955BF9053CCDE8701D3C] = Function params_encoded_ref::replace pass:v,q[Replace params] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/params_encoded_base.adoc[params_encoded_base]::xref:boost/urls/params_encoded_base/iterator.adoc[iterator] replace( xref:boost/urls/params_encoded_base.adoc[params_encoded_base]::xref:boost/urls/params_encoded_base/iterator.adoc[iterator] pos, const xref:boost/urls/param_pct_view.adoc[param_pct_view]& p); ---- == Description pass:v,q[This function replaces the contents] pass:v,q[of the element at `pos` with the] pass:v,q[specified param.] pass:v,q[All iterators that are equal to] pass:v,q[`pos` or come after are invalidated.] [NOTE] pass:v,q[The strings passed in must not come] pass:v,q[from the element being replaced,] pass:v,q[or else the behavior is undefined.] === Example [,cpp] ---- url u( "?first=John&last=Doe" ); u.encoded_params().replace( u.encoded_params().begin(), { "title", "Mr" }); assert( u.encoded_query() == "title=Mr&last=Doe" ); ---- === Complexity pass:v,q[Linear in `this->url().encoded_query().size()`.] === Exception Safety pass:v,q[Strong guarantee.] pass:v,q[Calls to allocate may throw.] pass:v,q[Exceptions thrown on invalid input.] == Return Value * `iterator` == Parameters |=== | Name | Type | *pos* | `iterator` | *p* | `` |===