Returns a CordBuffer, re-using potential existing capacity in this cord.
Declared in <absl/strings/cord.h>
CordBuffer
GetCustomAppendBuffer(
size_t block_size,
size_t capacity,
size_t min_capacity = 16);
This function is identical to GetAppendBuffer, except that in the case where a new CordBuffer is allocated, it is allocated using the provided custom limit instead of the default limit. GetAppendBuffer will default to CordBuffer::CreateWithDefaultLimit(capacity) whereas this method will default to CordBuffer::CreateWithCustomLimit(block_size, capacity). This method is equivalent to GetAppendBuffer if block_size is zero. See the documentation for CreateWithCustomLimit for more details on the restrictions and legal values for block_size.
A CordBuffer reusing spare capacity when available.
| Name | Description |
|---|---|
| block_size | The custom allocation limit for a newly allocated buffer. |
| capacity | The desired capacity of the returned buffer. |
| min_capacity | The minimum extra capacity required to reuse existing spare capacity. |