2009scape-website/site/candybox/scripts/base_js_additions.js

12 lines
451 B
JavaScript
Raw Normal View History

2020-11-30 02:55:42 +01:00
String.prototype.replaceAt = function(index, text){
return this.substr(0, index) + text + this.substr(index + text.length);
}
String.prototype.addTagAt = function(index, tagBegin, tagEnd, size){
return this.substr(0, index) + tagBegin + this.substr(index, size) + tagEnd + this.substr(index + size);
}
String.prototype.replaceAt_with_size = function(index, text, size){
return this.substr(0, index) + text + this.substr(index + size);
}