[#absl-CordBuffer-SetLength] = xref:absl.adoc[absl]::xref:absl/CordBuffer.adoc[CordBuffer]::SetLength :relfileprefix: ../../ :mrdocs: Sets the data length of this instance. Applications must make sure all data of the specified length has been initialized before adding a CordBuffer to a Cord: failure to do so will lead to undefined behavior. Setting the length to a small value or zero does not release any memory held by this CordBuffer instance. Requires `length <= capacity()`. Applications should preferably use the `IncreaseLengthBy()` method above in combination with the 'available()` or `available_up_to()` methods. == Synopsis Declared in `<absl/strings/cord_buffer.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void SetLength(size_t length); ---- == Parameters [cols="1,4"] |=== | Name| Description | *length* | The new length of the initialized data. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#