pub fn crlf<T, E: ParseError<T>>(
    input: T
) -> IResult<T, <T as IntoOutput>::Output, E>where
    T: Slice<Range<usize>> + Slice<RangeFrom<usize>> + Slice<RangeTo<usize>>,
    T: InputIter,
    T: IntoOutput,
    T: Compare<&'static str>,
👎Deprecated since 8.0.0:

Replaced with nom8::character::crlf with input wrapped in nom8::input::Streaming

Expand description

Recognizes the string “\r\n”.

Streaming version: Will return Err(nom8::Err::Incomplete(_)) if there’s not enough input data.

Example

assert_eq!(crlf::<_, (_, ErrorKind)>("\r\nc"), Ok(("c", "\r\n")));
assert_eq!(crlf::<_, (_, ErrorKind)>("ab\r\nc"), Err(Err::Error(("ab\r\nc", ErrorKind::CrLf))));
assert_eq!(crlf::<_, (_, ErrorKind)>(""), Err(Err::Incomplete(Needed::new(2))));

WARNING: Deprecated, replaced with nom8::character::crlf with input wrapped in nom8::input::Streaming