interpolate static method
Interpolate {} tokens in the input string
Implementation
static String interpolate(String input, ConsumerSupplierFunction<String, String?> callback)
{
String matchCallback(Match match)
{
String key = match.group(1)!;
return callback(key) ?? ella.EMPTY_STRING;
}
return input.replaceAllMapped(_INTERPOLATE_REGEXP, matchCallback);
}