eol

Function eol 

Source
pub fn eol() -> Eol
Expand description

Leaf parser which matches newlines or the end of the input.

Matches both LF and CRLF line endings.

ยงExamples

assert_eq!(
    parser::eol().parse(b"\nabc"),
    Ok(((), &b"abc"[..]))
);
assert_eq!(
    parser::eol().parse(b"\r\nabc"),
    Ok(((), &b"abc"[..]))
);
assert_eq!(
    parser::eol().parse(b""),
    Ok(((), &b""[..]))
);