pub fn between(
open: &'static str,
close: &'static str,
) -> impl Parser<String, Err = BetweenErr>Expand description
Takes a segment between a given opener and closer.
let mut input = ParserString::from("(abc) ");
let middle = between("(", ")").parse(&mut input);
assert!(middle.is_ok_and(|s| s == "abc"));