Extraction until the buffer is exhausted, but no more.
Synopsis
Declared in <bslstl_istringstream.h>
streamsize
readsome(
char_type* __s,
streamsize __n);
Description
Extracts characters and stores them into __s depending on the number of characters remaining in the streambuf's buffer, rdbuf()‐>in_avail(), called A here:
-
if
A==‐1,sets eofbit and extracts no characters -
if
A==0,extracts no characters -
if
A>0,extractsmin(A,n)
The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the streambuf.
Return Value
The number of characters extracted.
Parameters
Name |
Description |
__s |
A character array. |
__n |
Maximum number of characters to store. |
Created with MrDocs