combine::parser::char

Function oct_digit

source
pub fn oct_digit<Input>() -> impl Parser<Input, Output = char, PartialState = ()>
where Input: Stream<Token = char>,
Expand description

Parses an octal digit.

use combine::Parser;
use combine::parser::char::oct_digit;
assert_eq!(oct_digit().parse("7"), Ok(('7', "")));
assert!(oct_digit().parse("8").is_err());