[#BloombergLP-bdlc-BitArray-insert-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::insert
:relfileprefix: ../../../
:mrdocs:

Insert repeated bit values at `dstIndex` in this array&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
insert(
    std::size&lowbar;t dstIndex,
    bool value,
    std::size&lowbar;t numBits);
----

== Description

Insert into this array at the specified `dstIndex` the specified `numBits` having the specified `value`&period; All values with indices at or above `dstIndex` in this array are shifted up by `numBits` bit positions&period; The behavior is undefined unless `dstIndex &lt;&equals; length()`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dstIndex*
| index at which to insert
| *value*
| bit value to insert
| *numBits*
| number of bits to insert
|===


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