[#bsl-basic_stringbuf-str-0d9]
= xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic&lowbar;stringbuf]::str
:relfileprefix: ../../
:mrdocs:

`str` overloads

== Synopses

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

Return the currently buffered sequence of characters, leaving this object empty&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringbuf.adoc[basic&lowbar;stringbuf&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;::StringType]
xref:bsl/basic_stringbuf/str-0cb.adoc[str]() &amp;&amp;;
----

[.small]#xref:bsl/basic_stringbuf/str-0cb.adoc[_» more&period;&period;&period;_]#

Return the currently buffered sequence of characters&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringbuf.adoc[basic&lowbar;stringbuf&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;::StringType]
xref:bsl/basic_stringbuf/str-09.adoc[str]() const &amp;;
----

[.small]#xref:bsl/basic_stringbuf/str-09.adoc[_» more&period;&period;&period;_]#

Reset the buffered character sequence to the specified `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/basic_stringbuf/str-0cf.adoc[str](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] value);
----

[.small]#xref:bsl/basic_stringbuf/str-0cf.adoc[_» more&period;&period;&period;_]#

Reset the buffered character sequence to the specified `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/basic_stringbuf/str-0c4.adoc[str](xref:bsl/basic_stringbuf.adoc[StringType] const& value);
----

[.small]#xref:bsl/basic_stringbuf/str-0c4.adoc[_» more&period;&period;&period;_]#

Return the buffered sequence of characters using the given allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class SALLOC&gt;
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, SALLOC&gt;]
xref:bsl/basic_stringbuf/str-03.adoc[str](SALLOC const& allocator) const
requires bsl&colon;&colon;IsStdAllocator&lt;SALLOC&gt;&colon;&colon;value;
----

[.small]#xref:bsl/basic_stringbuf/str-03.adoc[_» more&period;&period;&period;_]#

Reset the buffered character sequence from a string&hyphen;view&hyphen;like value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
void
xref:bsl/basic_stringbuf/str-0dd.adoc[str](STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& value);
----

[.small]#xref:bsl/basic_stringbuf/str-0dd.adoc[_» more&period;&period;&period;_]#

Reset the buffered character sequence to the specified `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class SALLOC&gt;
void
xref:bsl/basic_stringbuf/str-07.adoc[str](xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, SALLOC&gt;] const& value)
requires !bsl&colon;&colon;is&lowbar;same&lt;ALLOCATOR, SALLOC&gt;&colon;&colon;value;
----

[.small]#xref:bsl/basic_stringbuf/str-07.adoc[_» more&period;&period;&period;_]#

== Return Value

* currently buffered sequence of characters, leaving this object empty
* currently buffered sequence of characters
* buffered character sequence using the specified allocator

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| new character sequence for the buffer
| *allocator*
| allocator for the returned string
|===


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