Function combine::char::crlf [] [src]

pub fn crlf<I>() -> CrLf<I> where
    I: Stream<Item = char>,
    I::Error: ParseError<I::Item, I::Range, I::Position>, 

Parses carriage return and newline, 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());