function sprintf(str) {
		var args = [].slice.call(arguments, 1);

		return str.replace(/%[a-z]/g, function() {
			var value = args.shift();
			return typeOf(value) !== 'undefined' ? value : '';
		});
	}
Pseudo sprintf implementation - simple way to replace tokens with specified values.

@param {String} str String with tokens
@return {String} String with replaced tokens