[#bsl-basic_string-0f3-2constructor-07] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0f3.adoc[basic_string<char32_t>]::basic_string :relfileprefix: ../../ :mrdocs: Create a string that has the same value as the specified `strRef` string. The resulting string will contain the same sequence of characters as `strRef`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is not specified, then a default‐constructed allocator is used. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- basic_string( xref:BloombergLP/bslstl/StringRefData-04.adoc[BloombergLP::bslstl::StringRefData<char32_t>] const& strRef, xref:bsl/allocator-0df.adoc[allocator<char32_t>] const& basicAllocator = ALLOCATOR()); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#