[#BloombergLP-bdlc-CompactedArray-replace-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::replace
:relfileprefix: ../../../
:mrdocs:

Change the values of the specified `numElements` starting at the specified `dstIndex` in this array to those of the `numElements` starting at the specified `srcIndex` in the specified `srcArray`&period; The behavior is undefined unless `srcIndex &plus; numElements &lt;&equals; srcArray&period;length()` and `dstIndex &plus; numElements &lt;&equals; length()`&period; Note that if this array and `srcArray` are the same, the behavior is as if a copy of `srcArray` were passed&period;

== Synopsis

Declared in `&lt;bdlc&lowbar;compactedarray&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
replace(
    std::size&lowbar;t dstIndex,
    xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray] const& srcArray,
    std::size&lowbar;t srcIndex,
    std::size&lowbar;t numElements);
----


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