[#bsl-basic_string-01d-reserve] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-01d.adoc[basic_string<char8_t>]::reserve :relfileprefix: ../../ :mrdocs: Change the capacity of this string to the specified `newCapacity`. Note that the capacity of a string is the maximum length it can accommodate without reallocation. The actual storage allocated may be higher. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void reserve(xref:bsl/basic_string-01d/size_type.adoc[size_type] newCapacity); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#