[#absl-CordBuffer-IncreaseLengthBy] = xref:absl.adoc[absl]::xref:absl/CordBuffer.adoc[CordBuffer]::IncreaseLengthBy :relfileprefix: ../../ :mrdocs: Increases the length of this buffer by the specified 'n' bytes. == Synopsis Declared in `<absl/strings/cord_buffer.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void IncreaseLengthBy(size_t n); ---- == Description Applications must make sure all data in this buffer up to the new length has been initialized before adding a CordBuffer to a Cord: failure to do so will lead to undefined behavior. Requires `length() + n <= capacity()`. Typically, applications will use 'available_up_to()` to get a span of the desired capacity, and use `span.size()` to increase the length as in: absl::Span<char> span = buffer.available_up_to(desired); buffer.IncreaseLengthBy(span.size()); memcpy(span.data(), src, span.size()); etc... == Parameters [cols="1,4"] |=== | Name| Description | *n* | The number of bytes to add to the current length. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#