Function combine::parser::char::char[][src]

pub fn char<Input>(c: char) -> Token<Input> where
    Input: Stream<Token = char>,
    Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, 
Expand description

Parses a character and succeeds if the character is equal to c.

use combine::Parser;
use combine::parser::char::char;
assert_eq!(char('!').parse("!"), Ok(('!', "")));
assert!(char('A').parse("!").is_err());