Macro nom::take_until[][src]

macro_rules! take_until {
    ($i:expr, $substr:expr) => { ... };
}

take_until!(tag) => &[T] -> IResult<&[T], &[T]> consumes data until it finds the specified tag.

The remainder still contains the tag. (As opposed to take_until! which removes it from the remainder.)

Example

 named!(x, take_until!("foo"));
 let r = x(&b"abcd foo efgh"[..]);
 assert_eq!(r, Ok((&b"foo efgh"[..], &b"abcd "[..])));