pub fn newline<I, Error: ParseError<I>>(input: I) -> IResult<I, char, Error>👎Deprecated since 8.0.0: Replaced with
nom8::character::newline with input wrapped in nom8::input::StreamingExpand description
Matches a newline character ‘\n’.
Streaming version: Will return Err(nom8::Err::Incomplete(_)) if there’s not enough input data.
§Example
assert_eq!(newline::<_, (_, ErrorKind)>("\nc"), Ok(("c", '\n')));
assert_eq!(newline::<_, (_, ErrorKind)>("\r\nc"), Err(Err::Error(("\r\nc", ErrorKind::Char))));
assert_eq!(newline::<_, (_, ErrorKind)>(""), Err(Err::Incomplete(Needed::new(1))));WARNING: Deprecated, replaced with nom8::character::newline with input wrapped in nom8::input::Streaming