[#BloombergLP-bdlbb-BlobUtil-copy-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/BlobUtil.adoc[BlobUtil]::copy :relfileprefix: ../../../ :mrdocs: Copy a byte range from a blob into a contiguous destination buffer. == Synopsis Declared in `<bdlbb_blobutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void copy( char* dstBuffer, xref:BloombergLP/bdlbb/Blob.adoc[Blob] const& srcBlob, int position, int length); ---- == Description Copy the specified `length` bytes starting at the specified `position` in the specified `srcBlob` to the specified `dstBuffer`. The behavior of this function is undefined unless `0 <= length`, `0 <= position`, `position <= srcBlob.totalSize() ‐ length`, and `dstBuffer` has room for `length` bytes. Note that this function does _not_ set `dstBuffer[length]` to 0. == Parameters [cols="1,4"] |=== | Name| Description | *dstBuffer* | contiguous destination buffer | *srcBlob* | source blob | *position* | starting byte offset in `srcBlob` | *length* | number of bytes to copy |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#