Discarding characters
Synopsis
Declared in <bslstl_istringstream.h>
__istream_type&
ignore(
streamsize __n,
int_type __delim);
Description
Extracts characters and throws them away until one of the following happens:
-
if __n
!=std::numeric_limits<int>::max(),__n characters are extracted -
the input sequence reaches end‐of‐file
-
the next character equals __delim (in this case, the character is extracted); note that this condition will never occur if __delim equals
traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a better performing implementation, while still conforming to the Standard.
Return Value
*this
Parameters
Name |
Description |
__n |
Number of characters to discard. |
__delim |
A "stop" character. |
Created with MrDocs