The goog.string.format Namespace

goog.string.format(formatString, var_args)

Performs sprintf-like conversion, ie. puts the values in a template. DO NOT use it instead of built-in conversions in simple cases such as 'Cost: %.2f' as it would introduce unneccessary latency oposed to 'Cost: ' + cost.toFixed(2).

formatString {string}
Template string containing % specifiers.
var_args {...string|number}
Values formatString is to be filled with.
returns {string}
Formatted string.