Macro nom::is_a_s
[−]
[src]
macro_rules! is_a_s { ($input:expr, $arr:expr) => { ... }; }
is_a_s!(&str) => &str -> IResult<&str, &str>
returns the longest list of characters that appear in the provided array
named!(abcd<&str, &str>, is_a_s!( "abcd" )); let r1 = abcd("aaaaefgh"); assert_eq!(r1,Ok(("efgh", "aaaa"))); let r2 = abcd("dcbaefgh"); assert_eq!(r2,Ok(("efgh", "dcba")));