[][src]Function combine::parser::byte::alpha_num

pub fn alpha_num<I>() -> AlphaNum<I> where
    I: Stream<Item = u8>,
    I::Error: ParseError<I::Item, I::Range, I::Position>, 

Parses either an ASCII alphabet letter or digit (a–z, A–Z, 0–9).

use combine::Parser;
use combine::parser::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());