[#BloombergLP-bdlbb-Blob-prependDataBuffer-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/Blob.adoc[Blob]::prependDataBuffer
:relfileprefix: ../../../
:mrdocs:

Insert the specified move&hyphen;insertable `buffer` before the beginning&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
prependDataBuffer(xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;BlobBuffer&gt;] buffer);
----

== Description

The length of this blob is incremented by the length of the prepended buffer&period; The `buffer` is left in a valid but unspecified state&period; The behavior is undefined unless neither the total size of the resulting blob nor its total number of buffers exceeds `INT&lowbar;MAX`&period; Note that this operation is equivalent to&colon; &grave; const int n &equals; blob&period;length()&semi; blob&period;insertBuffer(0, MoveUtil&colon;&colon;move(buffer))&semi; blob&period;setLength(n &plus; buffer&period;size())&semi; &grave; but is more efficient&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| move&hyphen;insertable blob buffer to prepend as data
|===


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