Function anychar

fn anychar<T, E: ParseError<T>>(input: T) -> crate::internal::IResult<T, char, E>
where
    T: Input,
    <T as Input>::Item: AsChar

Matches one element as a character.

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

Example

# use nom::{character::streaming::anychar, Err, error::ErrorKind, IResult, Needed};
assert_eq!(anychar::<_, (_, ErrorKind)>("abc"), Ok(("bc",'a')));
assert_eq!(anychar::<_, (_, ErrorKind)>(""), Err(Err::Incomplete(Needed::new(1))));