str overloads

Synopses

Declared in <bslstl_stringbuf.h>

Return the currently buffered sequence of characters, leaving this object empty.

Return the currently buffered sequence of characters.

Reset the buffered character sequence to the specified value.

Reset the buffered character sequence to the specified value.

void
str(StringType const& value);

Return the buffered sequence of characters using the given allocator.

template<class SALLOC>
basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>
str(SALLOC const& allocator) const
requires bsl::IsStdAllocator<SALLOC>::value;

Reset the buffered character sequence from a string‐view‐like value.

template<class STRING_VIEW_LIKE_TYPE>
void
str(STRING_VIEW_LIKE_TYPE const& value);

Reset the buffered character sequence to the specified value.

template<class SALLOC>
void
str(basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC> const& value)
requires !bsl::is_same<ALLOCATOR, SALLOC>::value;

Return Value

  • currently buffered sequence of characters, leaving this object empty

  • currently buffered sequence of characters

  • buffered character sequence using the specified allocator

Parameters

Name

Description

value

new character sequence for the buffer

allocator

allocator for the returned string

Created with MrDocs