[#BloombergLP-bdlb-BitStringUtil-copy] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitStringUtil.adoc[BitStringUtil]::copy :relfileprefix: ../../../ :mrdocs: Copy bits from a source bit string into a destination bit string. == Synopsis Declared in `<bdlb_bitstringutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void copy( uint64_t* dstBitString, std::size_t dstIndex, uint64_t const* srcBitString, std::size_t srcIndex, std::size_t numBits); ---- == Description Copy to the specified `dstBitString`, beginning at the specified `dstIndex`, the specified `numBits` beginning at the specified `srcIndex` in the specified `srcBitString`. This function works correctly regardless of whether the source and destination ranges overlap. The behavior is undefined unless `dstBitString` has a capacity of at least `dstIndex + numBits` and `srcBitString` has a length of at least `srcIndex + numBits`. == Parameters [cols="1,4"] |=== | Name| Description | *dstBitString* | destination bit string | *dstIndex* | starting bit index in the destination | *srcBitString* | source bit string | *srcIndex* | starting bit index in the source | *numBits* | number of bits to copy |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#