|
streambuf::xsgetnvirtual protected member function
streamsize xsgetn ( char * s, streamsize n ); Get sequence of characters Gets up to n characters from the input sequence and stores them in the array pointed by s.If less than n characters are available in the input sequence the function returns all the available characters, as if successive calls to sbumpc were made until an EOF (or traits::eof() for other traits) was returned. This is a virtual member function that can be redefined for a specific behavior in derived classes. Its default behavior in streambuf is to perform the expected behavior by calling repeatedly the member function sbumpc, but this may be overriden for more efficient implementations in derived classes (neither filebuf nor stringbuf do, though). Parameters
Return ValueThe number of characters gotten, returned as a value of type streamsize.Basic template member declaration( basic_streambuf<charT,traits> )
See also
|