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

pub fn upper<Input>() -> impl Parser<Input, Output = u8, PartialState = ()> where
    Input: Stream<Token = u8>,
    Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, 
Expand description

Parses an uppercase ASCII letter (A–Z).

use combine::Parser;
use combine::parser::byte::upper;
assert_eq!(upper().parse(&b"A"[..]), Ok((b'A', &b""[..])));
assert!(upper().parse(&b"a"[..]).is_err());