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

pub fn char<I>(c: char) -> Token<I> where
    I: Stream<Item = char>,
    I::Error: ParseError<I::Item, I::Range, I::Position>, 

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());