(function() {
function replaceAll(substr, newSubstr) {
const regExp = new RegExp(substr, "g");
return this.replace(regExp, newSubstr);
}
if (!String.prototype.hasOwnProperty("replaceAll")) {
String.prototype.replaceAll = replaceAll;
}
})();
简单all个字符串