[#bsl-basic_string-0f3-max_size] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0f3.adoc[basic_string<char32_t>]::max_size :relfileprefix: ../../ :mrdocs: Return the maximal possible length of this string. Note that requests to create a string longer than this number of characters are guaranteed to raise a `length_error` exception. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0f3/size_type.adoc[size_type] max_size() const noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#