/*** ** 功能: 字符串格式化替换操作 ***/ String.prototype.format = function () { var args = arguments; return this.replace(/\{(\d+)\}/g, function (m, i) { return args[i]; }); }
转载于:https://www.cnblogs.com/allen-tech/p/4758216.html
/*** ** 功能: 字符串格式化替换操作 ***/ String.prototype.format = function () { var args = arguments; return this.replace(/\{(\d+)\}/g, function (m, i) { return args[i]; }); }
转载于:https://www.cnblogs.com/allen-tech/p/4758216.html