Function combine::parser::char::crlf [−][src]
pub fn crlf<Input>() -> impl Parser<Input, Output = char, PartialState = ()> where
Input: Stream<Token = char>,
Input::Error: ParseError<Input::Token, Input::Range, Input::Position>,
Expand description
Parses carriage return and newline ("\r\n"
), returning the newline character.
use combine::Parser; use combine::parser::char::crlf; assert_eq!(crlf().parse("\r\n"), Ok(('\n', ""))); assert!(crlf().parse("\r").is_err()); assert!(crlf().parse("\n").is_err());