source/libs/Core/JavaScript/core.js
// Substitutes "{n}" tokens within the specified string with the respective arguments passed in.

Substitutes "{n}" tokens within the specified string with the respective arguments passed in.
Substitutes " { n } " tokens within the specified string with the respective arguments passed in .
function $format(str) {
	if (!str) return '';
	for (var i = 1; i < arguments.length; i++) {
		str = str.replace(new RegExp("\\{" + (i - 1) + "\\}", "g"), arguments[i]);
	}
	return str;
}
function $format ( str ) { if ( ! str ) return '' ; for ( var i = 1 ; i < arguments . length ; i ++ ) { str = str . replace ( new RegExp ( "\\{" + ( i - 1 ) + "\\}" , "g" ) , arguments [ i ] ) ; } return str ; }
Substitutes "{n}" tokens within the specified string with the respective arguments passed in.
Substitutes " { n } " tokens within the specified string with the respective arguments passed in .