fn parse_with_end_pat<'a>( buf: &'a [u8], end_sep: &[u8], ignore_esc: bool, ) -> Option<(&'a [u8], &'a [u8])>
Find and consume an end pattern, return (match, residual)
(match, residual)