[#boost-urls-params_ref-replace-09]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/params_ref.adoc[params&lowbar;ref]::replace
:relfileprefix: ../../../
:mrdocs:

Replace elements

== Synopses

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/params_ref.hpp#L700[boost&sol;url&sol;params&lowbar;ref&period;hpp]&gt;`

Replace elements


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/params_base/iterator.adoc[iterator]
xref:boost/urls/params_ref/replace-0d.adoc[replace](
    xref:boost/urls/params_base/iterator.adoc[iterator] pos,
    xref:boost/urls/param_view.adoc[param&lowbar;view] const& p);
----

[.small]#xref:boost/urls/params_ref/replace-0d.adoc[_» more&period;&period;&period;_]#

Replace elements


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/params_base/iterator.adoc[iterator]
xref:boost/urls/params_ref/replace-0b.adoc[replace](
    xref:boost/urls/params_base/iterator.adoc[iterator] from,
    xref:boost/urls/params_base/iterator.adoc[iterator] to,
    std::initializer&lowbar;list&lt;param&lowbar;view&gt; init);
----

[.small]#xref:boost/urls/params_ref/replace-0b.adoc[_» more&period;&period;&period;_]#

Replace elements


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FwdIt&gt;
xref:boost/urls/params_base/iterator.adoc[iterator]
xref:boost/urls/params_ref/replace-01.adoc[replace](
    xref:boost/urls/params_base/iterator.adoc[iterator] from,
    xref:boost/urls/params_base/iterator.adoc[iterator] to,
    FwdIt first,
    FwdIt last);
----

[.small]#xref:boost/urls/params_ref/replace-01.adoc[_» more&period;&period;&period;_]#

== Return Value

* An iterator to the element&period;
* An iterator to the first element inserted, or one past `to` if `init&period;size() &equals;&equals; 0`&period;
* An iterator to the first element inserted, or one past `to` if `first &equals;&equals; last`&period;
* An iterator to the first element inserted, or one past `to` if `first &equals;&equals; last`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pos*
| An iterator to the element&period;
| *p*
| The param to assign&period;
| *from,to*
| The range of elements to replace&period;
| *init*
| The list of params to assign&period;
| *from*
| The first element to replace&period;
| *to*
| One past the last element to replace&period;
| *first*
| The first element to insert&period;
| *last*
| One past the last element to insert&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
