[][src]Function nom::character::complete::anychar

pub fn anychar<T, E: ParseError<T>>(input: T) -> IResult<T, char, E> where
    T: InputIter + InputLength + Slice<RangeFrom<usize>>,
    <T as InputIter>::Item: AsChar

matches one byte as a character. Note that the input type will accept a str, but not a &[u8], unlike many other nom parsers.

Example

assert_eq!(anychar::<_,(&str, ErrorKind)>("abc"), Ok(("bc",'a')));