[#bsl-basic_string-0ce-reserve]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-0ce.adoc[basic&lowbar;string&lt;char16&lowbar;t&gt;]::reserve
:relfileprefix: ../../
:mrdocs:

Change the capacity of this string to the specified `newCapacity`&period; Note that the capacity of a string is the maximum length it can accommodate without reallocation&period; The actual storage allocated may be higher&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
reserve(xref:bsl/basic_string-0ce/size_type.adoc[size&lowbar;type] newCapacity);
----


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