Function chomp::parsers::not_token [] [src]

pub fn not_token<I: Input>(i: I, t: I::Token) -> SimpleResult<I, I::Token>

Matches a single token as long as it is not equal to t, returning the match on success.

If the buffer length is 0 this parser is considered incomplete.

use chomp::prelude::{parse_only, not_token};

assert_eq!(parse_only(|i| not_token(i, b'b'), b"abc"), Ok(b'a'));