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

`assign` overloads

== Synopses

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

Bind this string reference to the same string as `stringRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslstl/StringRefImp-0c/assign-0f.adoc[assign](xref:BloombergLP/bslstl/StringRefImp-0c.adoc[StringRefImp&lt;CHAR&lowbar;TYPE&gt;] const& stringRef);
----

[.small]#xref:BloombergLP/bslstl/StringRefImp-0c/assign-0f.adoc[_» more&period;&period;&period;_]#

Bind this string reference to the specified string&period;


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

[.small]#xref:BloombergLP/bslstl/StringRefImp-0c/assign-06.adoc[_» more&period;&period;&period;_]#

Bind this string reference to a null&hyphen;terminated C string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslstl/StringRefImp-0c/assign-023.adoc[assign](CHAR&lowbar;TYPE const* data);
----

[.small]#xref:BloombergLP/bslstl/StringRefImp-0c/assign-023.adoc[_» more&period;&period;&period;_]#

Bind this string reference to the specified iterator range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslstl/StringRefImp-0c/assign-09.adoc[assign](
    xref:BloombergLP/bslstl/StringRefImp-0c/const_iterator.adoc[const&lowbar;iterator] begin,
    xref:BloombergLP/bslstl/StringRefImp-0c/const_iterator.adoc[const&lowbar;iterator] end);
----

[.small]#xref:BloombergLP/bslstl/StringRefImp-0c/assign-09.adoc[_» more&period;&period;&period;_]#

Assign this ref to the specified `data` of the specified `length`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslstl/StringRefImp-0c/assign-00.adoc[assign](
    CHAR&lowbar;TYPE const* data,
    xref:BloombergLP/bslstl/StringRefImp-0c/size_type.adoc[size&lowbar;type] length);
----

[.small]#xref:BloombergLP/bslstl/StringRefImp-0c/assign-00.adoc[_» more&period;&period;&period;_]#

Bind this string reference to the specified character sequence&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INT&lowbar;TYPE&gt;
void
xref:BloombergLP/bslstl/StringRefImp-0c/assign-025.adoc[assign](
    CHAR&lowbar;TYPE const* data,
    INT&lowbar;TYPE length)
requires bsl&colon;&colon;is&lowbar;integral&lt;INT&lowbar;TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bslstl/StringRefImp-0c/assign-025.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stringRef*
| string reference to assign from
| *str*
| string whose contents are referenced
| *data*
| null&hyphen;terminated character string to reference
| *begin*
| start of the character sequence to reference
| *end*
| one past the end of the character sequence
| *length*
| number of characters in the sequence
|===


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