str overloads
Synopses
Declared in <bslstl_stringbuf.h>
Return the currently buffered sequence of characters. If this object was created only in input mode, the resultant StringType contains the character sequence in the range [eback(), egptr())]. If modeBitMask & ios_base::out specified at construction is nonzero then the resultant StringType 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 StringType is returned. This object is left in an empty state.
Return the currently buffered sequence of characters. If this object was created only in input mode, the resultant StringType contains the character sequence in the range [eback(), egptr())]. If modeBitMask & ios_base::out specified at construction is nonzero then the resultant StringType 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 StringType is returned.
Same as the str overload taking const StringType&.
void
str(BloombergLP::bslmf::MovableRef<StringType> value);
Reset the internally buffered sequence of characters to the specified value. Update the beginning and end of both the input and output sequences to be the beginning and end of the updated buffer, update the current input position to be the beginning of the updated buffer, and update the current output position to be the end of the updated buffer. If value is passed by MovableRef, then it is left in an unspecified but valid state.
void
str(StringType const& value);
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.
template<class SALLOC>
basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>
str(SALLOC const& allocator) const
requires bsl::IsStdAllocator<SALLOC>::value;
Reset the internally buffered sequence of characters to the specified value (of a type convertible to basic_string_view<CHAR_TYPE, CHAR_TRAITS> but not to const CHAR_TYPE *).
template<class STRING_VIEW_LIKE_TYPE>
void
str(STRING_VIEW_LIKE_TYPE const& value);
Same as the str overload taking const StringType&.
template<class SALLOC>
void
str(basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC> const& value)
requires !bsl::is_same<ALLOCATOR, SALLOC>::value;
Created with MrDocs