Macro nom::take_until_either_and_consume
[−]
[src]
macro_rules! take_until_either_and_consume { ($input:expr, $arr:expr) => { ... }; }
take_until_either_and_consume!(chars) => &[T] -> IResult<&[T], &[T]>
consumes data until it finds any of the specified characters, and consume it
The parsed input and the tag are removed from the remainder.
(As opposed to take_until_either!
that does not remove the tag from the remainder.)
Example
named!(x, take_until_either_and_consume!("012")); let r = x(&b"abcd2efgh"[..]); assert_eq!(r, Ok((&b"efgh"[..], &b"abcd"[..])));