[#BloombergLP-bdlc-BitArray-assign-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::assign
:relfileprefix: ../../../
:mrdocs:

Replace the specified `numBits` in this array, beginning at the specified `dstIndex`, with values from the specified `srcArray` beginning at the specified `srcIndex`&period; The behavior is undefined unless `dstIndex &plus; numBits &lt;&equals; length()` and `srcIndex &plus; numBits &lt;&equals; srcArray&period;length()`&period; Note that, absent aliasing, this method has the same behavior as, but is more efficient than&colon; &grave; remove(dstIndex, numBits)&semi; insert(dstIndex, srcArray, srcIndex, numBits)&semi; &grave;

== Synopsis

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

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


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