[#absl-CordBuffer-IncreaseLengthBy]
= xref:absl.adoc[absl]::xref:absl/CordBuffer.adoc[CordBuffer]::IncreaseLengthBy
:relfileprefix: ../../
:mrdocs:

Increases the length of this buffer by the specified &apos;n&apos; bytes&period;

== Synopsis

Declared in `&lt;absl&sol;strings&sol;cord&lowbar;buffer&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
IncreaseLengthBy(size&lowbar;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&colon; failure to do so will lead to undefined behavior&period; Requires `length() &plus; n &lt;&equals; capacity()`&period; Typically, applications will use &apos;available&lowbar;up&lowbar;to()&grave; to get a span of the desired capacity, and use `span&period;size()` to increase the length as in&colon; absl&colon;&colon;Span&lt;char&gt; span &equals; buffer&period;available&lowbar;up&lowbar;to(desired)&semi; buffer&period;IncreaseLengthBy(span&period;size())&semi; memcpy(span&period;data(), src, span&period;size())&semi; etc&period;&period;&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *n*
| The number of bytes to add to the current length&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
