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