[#bsl-basic_stringbuf-str-03] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::str :relfileprefix: ../../ :mrdocs: Return the currently buffered sequence of characters in a `basic_string` that uses the specified `allocator`. If this object was created only in input mode, the resultant `basic_string` contains the character sequence in the range `[eback(), egptr())]`. If `modeBitMask & ios_base::out` specified at construction is nonzero then the resultant `basic_string` contains the character sequence in the range `[pbase(), high_mark)]`, where `high_mark` represents the position one past the highest initialized character in the buffer. Otherwise this object has been created in neither input nor output mode and a zero length `basic_string` is returned. == Synopsis Declared in `<bslstl_stringbuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class SALLOC> xref:bsl/basic_string-0faf.adoc[basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>] str(SALLOC const& allocator) const requires bsl::IsStdAllocator<SALLOC>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#