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

pub fn newline<I>() -> Newline<I> where
    I: Stream<Item = u8>,
    I::Error: ParseError<I::Item, I::Range, I::Position>, 

Parses a newline byte (b'\n').

use combine::Parser;
use combine::parser::byte::newline;
assert_eq!(newline().parse(&b"\n"[..]), Ok((b'\n', &b""[..])));
assert!(newline().parse(&b"\r"[..]).is_err());