string_translate [function]

string_translate( string str, iterable repmap )

replaces parts of string str, specified in the keys of repmap, to the matching values of the same iterable

string_translate( "found %a files and %b folders", {"%a" = 5, "%b" = 17} ); // string [28] "found 5 files and 17 folders"