[#BloombergLP-bdlbb-BlobUtil-copy-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/BlobUtil.adoc[BlobUtil]::copy
:relfileprefix: ../../../
:mrdocs:

`copy` overloads

== Synopses

Declared in `&lt;bdlbb&lowbar;blobutil&period;h&gt;`

Copy into the specified `dst` starting at the specified `dstOffset` the specified `length` bytes from the specified `src`&period; The behavior is undefined unless `0 &lt;&equals; dstOffset`, `0 &lt;&equals; length`, `dst &verbar;&verbar; 0 &equals;&equals; length`, `src &verbar;&verbar; 0 &equals;&equals; length`, `!dst &verbar;&verbar; dstOffset &lt;&equals; dst&hyphen;&gt;length() &hyphen; length`, and `src` refers to a buffer with at least `length` bytes&period; Note that this operation does not require `dst` to have a blob buffer factory in that it does not create or destroy blobs &hyphen;&hyphen; it simply copies data from `src` into `dst`, so `dst` must already have room for `length` bytes of data added at `dstOffset`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bdlbb/BlobUtil/copy-05.adoc[copy](
    xref:BloombergLP/bdlbb/Blob.adoc[Blob]* dst,
    int dstOffset,
    char const* src,
    int length);
----

[.small]#xref:BloombergLP/bdlbb/BlobUtil/copy-05.adoc[_» more&period;&period;&period;_]#

Copy the specified `length` bytes starting at the specified `position` in the specified `srcBlob` to the specified `dstBuffer`&period; The behavior of this function is undefined unless `0 &lt;&equals; length`, `0 &lt;&equals; position`, `position &lt;&equals; srcBlob&period;totalSize() &hyphen; length`, and `dstBuffer` has room for `length` bytes&period; Note that this function does _not_ set `dstBuffer&lsqb;length&rsqb;` to 0&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bdlbb/BlobUtil/copy-0d.adoc[copy](
    char* dstBuffer,
    xref:BloombergLP/bdlbb/Blob.adoc[Blob] const& srcBlob,
    int position,
    int length);
----

[.small]#xref:BloombergLP/bdlbb/BlobUtil/copy-0d.adoc[_» more&period;&period;&period;_]#

Copy into the specified `dst` starting at the specified `dstOffset` the specified `length` bytes starting at the specified `srcOffset` in the specified `src`&period; The behavior is undefined unless `0 &lt;&equals; dstOffset`, `0 &lt;&equals; srcOffset`, `0 &lt;&equals; length`, `dst &verbar;&verbar; 0 &equals;&equals; length`, `!dst &verbar;&verbar; dstOffset &lt;&equals; dst&hyphen;&gt;length() &hyphen; length`, and `srcOffset &lt;&equals; src&hyphen;&gt;length() &hyphen; length`&period; Note that this operation does not require `dst` to have a blob buffer factory in that it does not create or destroy blobs &hyphen;&hyphen; it simply copies data from `src` into `dst`, so `dst` must already have room for `length` bytes of data added at `dstOffset`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bdlbb/BlobUtil/copy-09.adoc[copy](
    xref:BloombergLP/bdlbb/Blob.adoc[Blob]* dst,
    int dstOffset,
    xref:BloombergLP/bdlbb/Blob.adoc[Blob] const& src,
    int srcOffset,
    int length);
----

[.small]#xref:BloombergLP/bdlbb/BlobUtil/copy-09.adoc[_» more&period;&period;&period;_]#


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