lib/Ext/util/Format.js
function (format) {
        var args = Ext.toArray(arguments, 1);
        return format.replace(Ext.util.Format.formatRe, function(m, i) {
            return args[i];
        });
    }
function (format) {
        var args = Ext.toArray(arguments, 1);
        return format.replace(Ext.util.Format.formatRe, function(m, i) {
            return args[i];
        });
    }
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.  Each
token must be unique, and must increment in the format {0}, {1}, etc.  Example usage:

var cls = 'my-class', text = 'Some text';
var s = Ext.util.Format.format('<div class="{0}">{1}</div>', cls, text);
// s now contains the string: '<div class="my-class">Some text</div>'

@param {String} string The tokenized string to be formatted.
@param {String...} values The values to replace token {0}, {1}, etc.
@return {String} The formatted string.