Extraction until the buffer is exhausted, but no more.
Declared in <bslstl_istringstream.h>
streamsize
readsome(
char_type* __s,
streamsize __n);
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, extracts min(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.
The number of characters extracted.
| Name | Description |
|---|---|
| __s | A character array. |
| __n | Maximum number of characters to store. |