basic_streambuf::sputbackc

int_type sputbackc(E c);

If a putback position is available and c compares equal to the character stored in that position, the member function decrements the next pointer for the input buffer and returns ch, which is the value T::to_int_type(c). Otherwise, it returns pbackfail(ch).