```Rust use std::rc::Rc; extern crate stringparser; use stringparser::Parser;
fn end_filter(c : Vec
if c.last().unwrap()== &'\'' {
return true;
}
else {
return false;
}
}
//can also use closures let callback = |s : String, line : usize, file : &str| { assert_eq!(String::from("foo"), s); };
let mut string_parser = Parser::new();
stringparser.add(String::from("'"), Rc::new(Box::from(endfilter)), Rc::new(Box::from(callback))); string_parser.parse("./text"); ```