[#bsl-basic_stringbuf-str-0d9] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::str :relfileprefix: ../../ :mrdocs: `str` overloads == Synopses Declared in `<bslstl_stringbuf.h>` Return the currently buffered sequence of characters, leaving this object empty. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_stringbuf.adoc[basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>::StringType] xref:bsl/basic_stringbuf/str-0cb.adoc[str]() &&; ---- [.small]#xref:bsl/basic_stringbuf/str-0cb.adoc[_» more..._]# Return the currently buffered sequence of characters. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_stringbuf.adoc[basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>::StringType] xref:bsl/basic_stringbuf/str-09.adoc[str]() const &; ---- [.small]#xref:bsl/basic_stringbuf/str-09.adoc[_» more..._]# Reset the buffered character sequence to the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/basic_stringbuf/str-0cf.adoc[str](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<StringType>] value); ---- [.small]#xref:bsl/basic_stringbuf/str-0cf.adoc[_» more..._]# Reset the buffered character sequence to the specified `value`. [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..._]# Return the buffered sequence of characters using the given 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_stringbuf/str-03.adoc[str](SALLOC const& allocator) const requires bsl::IsStdAllocator<SALLOC>::value; ---- [.small]#xref:bsl/basic_stringbuf/str-03.adoc[_» more..._]# Reset the buffered character sequence from a string‐view‐like value. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> void xref:bsl/basic_stringbuf/str-0dd.adoc[str](STRING_VIEW_LIKE_TYPE const& value); ---- [.small]#xref:bsl/basic_stringbuf/str-0dd.adoc[_» more..._]# Reset the buffered character sequence to the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class SALLOC> void xref:bsl/basic_stringbuf/str-07.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_stringbuf/str-07.adoc[_» more..._]# == 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]#