[−][src]Macro nom::is_a
is_a!(&[T]) => &[T] -> IResult<&[T], &[T]>
returns the longest list of bytes that appear in the provided array
Example
named!(abcd, is_a!( "abcd" )); let r1 = abcd(&b"aaaaefgh"[..]); assert_eq!(r1, Ok((&b"efgh"[..], &b"aaaa"[..]))); let r2 = abcd(&b"dcbaefgh"[..]); assert_eq!(r2, Ok((&b"efgh"[..], &b"dcba"[..])));