mirror of https://github.com/OISF/suricata
rust: add take_until_and_consume replacement function
parent
8664a55ee7
commit
030c9a3d86
@ -0,0 +1,12 @@
|
||||
#[macro_export]
|
||||
macro_rules! take_until_and_consume (
|
||||
( $i:expr, $needle:expr ) => (
|
||||
{
|
||||
let input: &[u8] = $i;
|
||||
|
||||
let (rem, res) = ::nom::take_until!(input, $needle)?;
|
||||
let (rem, _) = ::nom::take!(rem, $needle.len())?;
|
||||
Ok((rem, res))
|
||||
}
|
||||
);
|
||||
);
|
Loading…
Reference in New Issue