src/utils/StringUtils.js
function format(str) {
        // arguments[0] is the base string, so we need to adjust index values here
        var args = [].slice.call(arguments, 1);
        return str.replace(/\{(\d+)\}/g, function (match, num) {
            return typeof args[num] !== "undefined" ? args[num] : match;
        });
    }
function format(str) {
        // arguments[0] is the base string, so we need to adjust index values here
        var args = [].slice.call(arguments, 1);
        return str.replace(/\{(\d+)\}/g, function (match, num) {
            return typeof args[num] !== "undefined" ? args[num] : match;
        });
    }
function format ( str ) { // arguments[0] is the base string, so we need to adjust index values here var args = [ ] . slice . call ( arguments , 1 ) ; return str . replace ( / \{(\d+)\} / g , function ( match , num ) { return typeof args [ num ] !== "undefined" ? args [ num ] : match ; } ) ; }
Format a string by replacing placeholder symbols with passed in arguments.

Example: var formatted = StringUtils.format("Hello {0}", "World");

@param {string} str The base string
@param {...} Arguments to be substituted into the string

@return {string} Formatted string
Format a string by replacing placeholder symbols with passed in arguments .