Is there any built-in solution that allows to substitute strings in a manner of NSExpression
does (i.e. with a binding dictionary provided)?
So instead of:
let s = String(format: "%@ %@", arguments: ["foo", "bar"]) // "foo bar"
we have:
let s = String(format: "$foo $bar", ["foo": "hello", "bar": "world"]) // hello world
P.S. I'm aware of replaceOccurrences
, I need NSExpression style substitution. Thanks!