[#bsl-basic_string-0ce-2constructor-055] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0ce.adoc[basic_string<char16_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<char16_t>] const& strRef, xref:bsl/allocator-0df.adoc[allocator<char16_t>] const& basicAllocator = ALLOCATOR()); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#