Function combine::parser::char::alpha_num [−][src]
pub fn alpha_num<Input>(
) -> impl Parser<Input, Output = char, PartialState = ()> where
Input: Stream<Token = char>,
Input::Error: ParseError<Input::Token, Input::Range, Input::Position>,
Expand description
Parses either an alphabet letter or digit according to std::char::is_alphanumeric
.
use combine::Parser; use combine::parser::char::alpha_num; assert_eq!(alpha_num().parse("A"), Ok(('A', ""))); assert_eq!(alpha_num().parse("1"), Ok(('1', ""))); assert!(alpha_num().parse("!").is_err());