[#bsl-basic_string-0faf-2constructor-098]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic&lowbar;string]::basic&lowbar;string
:relfileprefix: ../../
:mrdocs:

Create a `basic&lowbar;string` object&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
explicit
basic&lowbar;string(STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& object);
----

== Description

Create a string that has the same value as the specified `object`&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is not specified, then a default&hyphen;constructed allocator is used&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *object*
| source object providing characters
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
