For output streams (mode & ios_base::out == true), pbase() points at the first character and epptr() >= pbase() + s.size() (epptr is allowed to point farther so that the following sputc() wouldn't immediately call overflow())