Javascript --扩展String实现替换字符串中index处字符

String.prototype.replaceCharAt = function(n,c){
return this.substr(0, n)+ c + this.substr(n+1,this.length-1-n);
}

原文地址:https://www.cnblogs.com/lcchuguo/p/4028549.html