[−][src]Macro gstuff::find_parse_replace_s
Uses nom to find all matches of the given $submac
parser and replace them with the parser's evaluations.
$starts
is a Pattern
that is used to speed up the search. It must match the beginning of any $submac
-compatible substrings.
For exaple, replacing "foo" with "bar" might look like this:
use nom::{self, IResult}; let bar_bar = find_parse_replace_s! ("foo bar", ascii_chars! ('f'), map! (tag_s! ("foo"), |_| "bar"));