The member function sputn() can be used to write multiple characters at once. This function
delegates the work to the virtual function xsputn(), which can be implemented for more efficient writing of multiple characters. The implementation of xsputn() in class basic_streambuf calls
sputc() for each character. Thus, overriding xsputn() is not necessary. Often, however, writing
multiple characters can be implemented more efficiently than writing characters one at a time. Thus,
this function can be used to optimize the processing of character sequences.