can.sub
Returns a string with {param} replaced values from data.
can.sub(str, data, remove, s)
Parameters
-
str
{String}
The string to make substitutes on
-
data
{Object}
The data to be used to look for properties. If it's an array, multiple objects can be used.
-
remove
{Boolean}
Optionalif a match is found, remove the property from the object
-
s
{String}
The string to replace
Returns
{String}
The converted string or null
if any data to render are undefined
or null
can.sub
returns a string with {param} replaced values from data, whereparam
is the name of an object property.