[#BloombergLP-bdlbb-BlobUtil-appendBufferIfValid-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/BlobUtil.adoc[BlobUtil]::appendBufferIfValid
:relfileprefix: ../../../
:mrdocs:

Append a moved capacity buffer to `dest` if size limits allow&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
appendBufferIfValid(
    xref:BloombergLP/bdlbb/Blob.adoc[Blob]* dest,
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;BlobBuffer&gt;] buffer);
----

== Description

Append the specified move&hyphen;insertable `buffer` after the last buffer of the specified `dest` if neither the resulting total size of `dest` nor its resulting total number of buffers exceeds `INT&lowbar;MAX`&period; Return 0 on success, and a non&hyphen;zero value (with no effect) otherwise&period; The length of the `dest` is unaffected&period; In case of success the `buffer` is left in a valid but unspecified state&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dest*
| destination blob
| *buffer*
| capacity buffer to move&hyphen;append
|===


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