FAR
Find And Replace string template engine
Provided with a template and a map, Find And Replace will attempt to find
all the keys (delimited with ${}
) in the template and replace them with
the corresponding value in the map. For example:
let template = "${capitalized specific} are my favorite ${category}.";
let mut args = new;
args.insert;
args.insert;
let s = far?;
assert_eq!;
If it fails for some reason, an explanation of why will be returned:
let template = "${capitalized specific} are my favorite ${category}.";
let mut args = new;
args.insert;
// Note the typo here
args.insert;
match far
Additional examples and weird edge-case behaviors can be found in
src/tests
.