Function combine::byte::alpha_num
[−]
[src]
pub fn alpha_num<I>() -> AlphaNum<I> where
I: Stream<Item = u8>,
Parses either an ASCII alphabet letter or digit (a–z, A–Z, 0–9).
use combine::Parser; use combine::byte::alpha_num; assert_eq!(alpha_num().parse(&b"A"[..]), Ok((b'A', &b""[..]))); assert_eq!(alpha_num().parse(&b"1"[..]), Ok((b'1', &b""[..]))); assert!(alpha_num().parse(&b"!"[..]).is_err());