pub fn newline<Input>() -> impl Parser<Input, Output = char, PartialState = ()>
Expand description
Parses a newline character ('\n'
).
use combine::Parser;
use combine::parser::char::newline;
assert_eq!(newline().parse("\n"), Ok(('\n', "")));
assert!(newline().parse("\r").is_err());