BloombergLP::bdlbb::Blob::trimLastDataBuffer

Trim the last data buffer down to lastDataBufferLength().

Synopsis

Declared in <bdlbb_blob.h>

BlobBuffer
trimLastDataBuffer();

Description

If there are no data buffers, or if the last data buffer is full (i.e., its size is lastDataBufferLength()), then this method has no effect. Return the leftover of the trimmed buffer or a default-constructed BlobBuffer if nothing to trim. Note that the length of the blob is unchanged, and that capacity buffers (i.e., of indices numDataBuffers() and higher) are not removed.

Return Value

the leftover of the trimmed buffer, or a default-constructed BlobBuffer if nothing was trimmed