pub fn anychar<T, E: ParseError<T>>(input: T) -> IResult<T, char, E>where
T: Stream,
<T as Stream>::Token: AsChar,👎Deprecated since 0.1.0: Replaced with <code>winnow::bytes::any</code>
Expand description
Matches one byte as a character. Note that the input type will
accept a str, but not a &[u8], unlike many other parsers.
Complete version: Will return an error if there’s not enough input data.
Example
fn parser(input: &str) -> IResult<&str, char> {
anychar(input)
}
assert_eq!(parser("abc"), Ok(("bc",'a')));
assert_eq!(parser(""), Err(ErrMode::Backtrack(Error::new("", ErrorKind::Eof))));WARNING: Deprecated, replaced with winnow::bytes::any