bsl::basic_stringbuf::pbackfail

Put back the specified character into the input sequence so that the next character read from the input sequence will be character. If character is either traits_type::eof() or is the same as the previously read character from the input sequence, then adjust the current input position, gptr, back one position. If character is neither traits_type::eof() nor the character previously read from the input sequence, but this string buffer was opened for writing (ios_base::out), then adjust the input sequence back one position and write character to that position. Return the character that was put back on success and traits_type::eof() if either the input position is currently at the beginning of the sequence or if the previous character in the input sequence is not character and this buffer was not opened for writing.

Synopsis

Declared in <bslstl_stringbuf.h>

virtual
basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>::int_type
pbackfail(int_type character = traits_type::eof());