Returns:
A
basic_string
object whose content is equal to the
basic_stringbuf
underlying character sequence
. If the
basic_stringbuf was created only in input mode, the resultant
basic_string contains the character sequence in the range
[eback(), egptr()). If the
basic_stringbuf was created with
which & ios_base::out being 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
. Characters can be initialized by writing to the stream, by constructing
the
basic_stringbuf with a
basic_string, or by calling the
str(basic_string) member function
. In the case of calling the
str(basic_string) member function, all characters initialized prior to
the call are now considered uninitialized (except for those characters re-initialized
by the new
basic_string)
. Otherwise the
basic_stringbuf has been created
in neither input nor output mode and a zero length
basic_string is returned
.