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

pub fn not_token<I: Copy + PartialEq>(i: Input<I>, t: I) -> SimpleResult<I, I>

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::{parse_only, not_token};

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