pub fn digit<I>() -> Digit<I>
Expand description
Parses a base-10 digit (0–9).
use combine::Parser;
use combine::parser::byte::digit;
assert_eq!(digit().parse(&b"9"[..]), Ok((b'9', &b""[..])));
assert!(digit().parse(&b"A"[..]).is_err());
pub fn digit<I>() -> Digit<I>
Parses a base-10 digit (0–9).
use combine::Parser;
use combine::parser::byte::digit;
assert_eq!(digit().parse(&b"9"[..]), Ok((b'9', &b""[..])));
assert!(digit().parse(&b"A"[..]).is_err());