Function combine::byte::hex_digit [] [src]

pub fn hex_digit<I>() -> HexDigit<I> where
    I: Stream<Item = u8>, 

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

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