Macro nom::take_until_either_and_consume1 [−][src]
macro_rules! take_until_either_and_consume1 { ($input:expr, $arr:expr) => { ... }; }
take_until_either_and_consume1!(chars) => &[T] -> IResult<&[T], &[T]>
consumes data (at least one byte) 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"[..])));