Append bytes to dest, preferring existing then spare capacity.

Synopsis

Declared in <bdlbb_blobutil.h>

static
void
appendWithCapacityBuffer(
    Blob* dest,
    BlobBuffer* buffer,
    char const* source,
    int length);

Description

Append the specified length bytes from the specified source address to the specified dest. Use the existing capacity in dest first, followed by that in the buffer, and finally allocate from the blob buffer factory associated with the dest. Load any unused space into the specified buffer. The behavior is undefined unless the range [source, source + length)] represents a readable sequence of memory.

Parameters

Name

Description

dest

destination blob

buffer

in/out spare capacity buffer

source

contiguous source address

length

number of bytes to append

Created with MrDocs