pub fn crlf<I>() -> CrLf<I>
Expand description
Parses carriage return and newline (&b"\r\n"
), returning the newline byte.
use combine::Parser;
use combine::parser::byte::crlf;
assert_eq!(crlf().parse(&b"\r\n"[..]), Ok((b'\n', &b""[..])));
assert!(crlf().parse(&b"\r"[..]).is_err());
assert!(crlf().parse(&b"\n"[..]).is_err());