[#bsl-basic_string-0ce-capacity] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0ce.adoc[basic_string<char16_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-0ce/size_type.adoc[size_type] capacity() const noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#