:relfileprefix: ../../../
[#B3D66661180658978F60BD1A11B64962F9ECEB1A]

= Function params_ref::replace

pass:v,q[Replace elements]


== Synopsis

Declared in header `</boost/url/params_ref.hpp#L727[boost/url/params_ref.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/params_base.adoc[params_base]::xref:boost/urls/params_base/iterator.adoc[iterator]
replace(
    xref:boost/urls/params_base.adoc[params_base]::xref:boost/urls/params_base/iterator.adoc[iterator] from,
    xref:boost/urls/params_base.adoc[params_base]::xref:boost/urls/params_base/iterator.adoc[iterator] to,
    initializer_list<xref:boost/urls/param_view.adoc[param_view]> init);
----

== Description

pass:v,q[This function replaces a range of] pass:v,q[elements with the params in an]
pass:v,q[initializer-list]
pass:v,q[.]
pass:v,q[All iterators that are equal to]
pass:v,q[`from` or come after are invalidated.]
[NOTE]
pass:v,q[The strings referenced by the inputs]
pass:v,q[must not come from the underlying url,]
pass:v,q[or else the behavior is undefined.]

=== 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.]



== Return Value

* `iterator` 


== Parameters

|===
| Name | Type 

| *from*
| `iterator`

| *to*
| `iterator`

| *init*
| `initializer_list`

|===



