src/javascript/core/utils/Basic.js
function sprintf(str) {
		var args = [].slice.call(arguments, 1);

		return str.replace(/%([a-z])/g, function($0, $1) {
			var value = args.shift();

			switch ($1) {
				case 's':
					return value + '';

				case 'd':
					return parseInt(value, 10);

				case 'f':
					return parseFloat(value);

				case 'c':
					return '';

				default:
					return value;
			}
		});
	}
function sprintf(str) {
		var args = [].slice.call(arguments, 1);

		return str.replace(/%([a-z])/g, function($0, $1) {
			var value = args.shift();

			switch ($1) {
				case 's':
					return value + '';

				case 'd':
					return parseInt(value, 10);

				case 'f':
					return parseFloat(value);

				case 'c':
					return '';

				default:
					return value;
			}
		});
	}
function sprintf ( str ) { var args = [ ] . slice . call ( arguments , 1 ) ; return str . replace ( / %([a-z]) / g , function ( $0 , $1 ) { var value = args . shift ( ) ; switch ( $1 ) { case 's' : return value + '' ; case 'd' : return parseInt ( value , 10 ) ; case 'f' : return parseFloat ( value ) ; case 'c' : return '' ; default : return value ; } } ) ; }
Pseudo sprintf implementation - simple way to replace tokens with specified values.

@param {String} str String with tokens
@return {String} String with replaced tokens
Pseudo sprintf implementation - simple way to replace tokens with specified values .