[#bsl-basic_ostringstream-str-02]
= xref:bsl.adoc[bsl]::xref:bsl/basic_ostringstream.adoc[basic&lowbar;ostringstream]::str
:relfileprefix: ../../
:mrdocs:

Return a copy of the stream buffer using the specified allocator&period;

== Synopsis

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

[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;]
str(SALLOC const& allocator) const
requires bsl&colon;&colon;IsStdAllocator&lt;SALLOC&gt;&colon;&colon;value;
----

== Description

Return a copy of the internally buffered sequence of characters maintained by this stream object in a `basic&lowbar;string` that uses the specified `allocator`&period;

== Return Value

copy of the buffered character sequence

== Parameters

[cols="1,4"]
|===
| Name| Description
| *allocator*
| allocator for the returned string
|===


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