Function bparse::end

source ·
pub fn end(input: &[u8]) -> Option<Matches<'_, 1>>
Expand description

A pattern that fails if the input is not empty

Example

use bparse::{Pattern, end};

assert_eq!(end.test(b"abc"), None);
assert_eq!(end.test(b"").unwrap().value(), b"");