fmt_parser.getchar [method]
fmt_parser.getchar( bool peek = false, bool as_int = false )
returns a character from stream
- if
peek
is true, stream is not advanced (next read operation will also work on the same character)
- if
as_int
is true, character is returned as integer (as one-character string otherwise)
- may return null and emit a warning on unexpected read errors
stream = fmt_string_parser( "action" );
stream.read( true ); // returns "a"
stream.read( true, true ); // returns 97
stream.read(); // returns "a"
stream.read(); // returns "c"