pub fn hex_digit<Input>() -> impl Parser<Input, Output = u8, PartialState = ()> where
    Input: Stream<Token = u8>,
    Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, 
Expand description

Parses an ASCII hexdecimal digit (accepts both uppercase and lowercase).

use combine::Parser;
use combine::parser::byte::hex_digit;
assert_eq!(hex_digit().parse(&b"F"[..]), Ok((b'F', &b""[..])));
assert!(hex_digit().parse(&b"H"[..]).is_err());