[#bsl-basic_string-0f3-capacity] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0f3.adoc[basic_string<char32_t>]::capacity :relfileprefix: ../../ :mrdocs: Return the capacity of this string, i.e., the maximum length for which resizing is guaranteed not to trigger a reallocation. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0f3/size_type.adoc[size_type] capacity() const noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#