search

goog.string.format

Provided By

Performs sprintf-like conversion, i.e. 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 unnecessary latency opposed to 'Cost: ' + cost.toFixed(2).

format( formatString, ...var_args ) string

Parameters
formatStringstring

Template string containing % specifiers.

var_args...(string|number|undefined)

Values formatString is to be filled with.

Returns
string

Formatted string.