Function combine::byte::crlf
[−]
[src]
pub fn crlf<I>() -> CrLf<I> where
I: Stream<Item = u8>,
Parses carriage return and newline (&b"\r\n"
), returning the newline byteacter.
use combine::Parser; use combine::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());