[#bsl-basic_ostringstream-str-04] = xref:bsl.adoc[bsl]::xref:bsl/basic_ostringstream.adoc[basic_ostringstream]::str :relfileprefix: ../../ :mrdocs: `str` overloads == Synopses Declared in `<bslstl_ostringstream.h>` Return the internally buffered sequence of characters maintained by this stream, leaving the stream empty. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_ostringstream.adoc[StringType] xref:bsl/basic_ostringstream/str-08.adoc[str]() &&; ---- [.small]#xref:bsl/basic_ostringstream/str-08.adoc[_» more..._]# Return the internally buffered sequence of characters maintained by this stream object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_ostringstream.adoc[StringType] xref:bsl/basic_ostringstream/str-0af7.adoc[str]() const &; ---- [.small]#xref:bsl/basic_ostringstream/str-0af7.adoc[_» more..._]# Same as the `str` overload taking `const StringType&`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/basic_ostringstream/str-0af2.adoc[str](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<StringType>] value); ---- [.small]#xref:bsl/basic_ostringstream/str-0af2.adoc[_» more..._]# Reset the internally buffered sequence of characters maintained by this stream object to the specified `value`. If `value` is passed by `MovableRef`, it is left in a valid but unspecified state. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/basic_ostringstream/str-007.adoc[str](xref:bsl/basic_ostringstream.adoc[StringType] const& value); ---- [.small]#xref:bsl/basic_ostringstream/str-007.adoc[_» more..._]# Return a copy of the internally buffered sequence of characters maintained by this stream object in a `basic_string` that uses the specified `allocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class SALLOC> xref:bsl/basic_string-0faf.adoc[basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>] xref:bsl/basic_ostringstream/str-02.adoc[str](SALLOC const& allocator) const requires bsl::IsStdAllocator<SALLOC>::value; ---- [.small]#xref:bsl/basic_ostringstream/str-02.adoc[_» more..._]# Reset the internally buffered sequence of characters maintained by this stream object to the specified `value` (of a type convertible to `basic_string_view<CHAR_TYPE, CHAR_TRAITS>` but not to `const CHAR_TYPE *`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> void xref:bsl/basic_ostringstream/str-009.adoc[str](STRING_VIEW_LIKE_TYPE const& value); ---- [.small]#xref:bsl/basic_ostringstream/str-009.adoc[_» more..._]# Same as the `str` overload taking `const StringType&`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class SALLOC> void xref:bsl/basic_ostringstream/str-0f.adoc[str](xref:bsl/basic_string-0faf.adoc[basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>] const& value) requires !bsl::is_same<ALLOCATOR, SALLOC>::value; ---- [.small]#xref:bsl/basic_ostringstream/str-0f.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#