function replacePlaceholders(text, placeholders) {
	var result = "";
	for ( var i = 0; i < text.length; i++) {
		var char = text.charAt(i);
		if (char == "0") {
			result += placeholders[0];
		} else if (char == "1") {
			result += placeholders[1];
		} else if (char == "2") {
			result += placeholders[2];
		} else {
			result += char;
		}
	}

	return result;
}
/**
 * Replace numeric placeholders with their values from a register.
 * 
 * @param text
 * @param placeholders
 * @returns {String}
 */
Replace numeric placeholders with their values from a register.

@param text
@param placeholders
@returns {String}
Replace numeric placeholders with their values from a register . @param text @param placeholders @returns { String }
function replacePlaceholders(text, placeholders) {
	var result = "";
	for ( var i = 0; i < text.length; i++) {
		var char = text.charAt(i);
		if (char == "0") {
			result += placeholders[0];
		} else if (char == "1") {
			result += placeholders[1];
		} else if (char == "2") {
			result += placeholders[2];
		} else {
			result += char;
		}
	}
	return result;
}
function replacePlaceholders ( text , placeholders ) { var result = "" ; for ( var i = 0 ; i < text . length ; i ++ ) { var char = text . charAt ( i ) ; if ( char == "0" ) { result += placeholders [ 0 ] ; } else if ( char == "1" ) { result += placeholders [ 1 ] ; } else if ( char == "2" ) { result += placeholders [ 2 ] ; } else { result += char ; } } return result ; }
Replace numeric placeholders with their values from a register.
Replace numeric placeholders with their values from a register .