Macro peel_ip::prelude::is_a_s
[−]
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, Done("efgh", "aaaa")); let r2 = abcd("dcbaefgh"); assert_eq!(r2, Done("efgh", "dcba"));