[#BloombergLP-bslstl-StringRefImp-0c-assign-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-0c.adoc[StringRefImp]::assign
:relfileprefix: ../../../
:mrdocs:

Bind this string reference to the specified string&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
assign(xref:bsl/basic_string-0faf.adoc[bsl::basic&lowbar;string&lt;CHAR&lowbar;TYPE&gt;] const& str);
----

== Description

Bind this string reference to the specified `str` string&period; The string indicated by `str` must remain valid as long as it is bound to this object&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| string whose contents are referenced
|===


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