Thanks! I made a small improvement so that all instances are replaced rather than just the first. :)
String.prototype.format = function () {
var a = this;
for (var k in arguments) {
a = a.replace(new RegExp("\\{" + k + "\\}", 'g'), arguments[k]);
}
return a
}
Thanks! I made a small improvement so that all instances are replaced rather than just the first. :)