replaceVariable

Replace an {variable} inside a string

pure
string
replaceVariable
(
const string page
,
const string key
,
const string value
)

Examples

It should replace a variable inside a page

`-{key}-`.replaceVariable("key", "value").should.equal("-value-");

Meta