[#BloombergLP-bdlbb-BlobUtil-insertBufferIfValid-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/BlobUtil.adoc[BlobUtil]::insertBufferIfValid :relfileprefix: ../../../ :mrdocs: Insert the specified `buffer` at the specified `index` in the specified `dest` if `0 <= index <= dest‐>numBuffers()` and neither the resulting total size of `dest` nor its resulting total number of buffers exceeds `INT_MAX`. Return 0 on success, and a non‐zero value (with no effect) otherwise. Increment the length of the 'dest by the size of the `buffer` if `buffer` is inserted _before_ the logical end of the `dest`. The length of the `dest` is if inserting at a position following all data buffers (e.g., inserting into an empty blob or inserting a buffer to increase capacity); in that case, the blob length must be changed by an explicit call to `setLength`. Buffers at `index` and higher positions (if any) are shifted up by one index position. == Synopsis Declared in `<bdlbb_blobutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int insertBufferIfValid( xref:BloombergLP/bdlbb/Blob.adoc[Blob]* dest, int index, xref:BloombergLP/bdlbb/BlobBuffer.adoc[BlobBuffer] const& buffer); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#