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

Return the currently buffered sequence of characters&period;

== Synopsis

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

[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]
str() const &amp;;
----

== Description

Return the currently buffered sequence of characters&period; If this object was created only in input mode, the resultant `StringType` contains the character sequence in the range `&lsqb;eback(), egptr())&rsqb;`&period; If `modeBitMask &amp; ios&lowbar;base&colon;&colon;out` specified at construction is nonzero then the resultant `StringType` contains the character sequence in the range `&lsqb;pbase(), high&lowbar;mark)&rsqb;`, where `high&lowbar;mark` represents the position one past the highest initialized character in the buffer&period; Otherwise this object has been created in neither input nor output mode and a zero length `StringType` is returned&period;

== Return Value

currently buffered sequence of characters


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