html/rainbow/rainbow.js
function _replaceAtPosition(position, replace, replace_with, code) {
        var sub_string = code.substr(position);
        return code.substr(0, position) + sub_string.replace(replace, replace_with);
    }
function _replaceAtPosition(position, replace, replace_with, code) {
        var sub_string = code.substr(position);
        return code.substr(0, position) + sub_string.replace(replace, replace_with);
    }
function _replaceAtPosition ( position , replace , replace_with , code ) { var sub_string = code . substr ( position ) ; return code . substr ( 0 , position ) + sub_string . replace ( replace , replace_with ) ; }
substring replace call to replace part of a string at a certain position

@param {number} position         the position where the replacement should happen
@param {string} replace          the text we want to replace
@param {string} replace_with     the text we want to replace it with
@param {string} code             the code we are doing the replacing in
@returns {string}
substring replace call to replace part of a string at a certain position