mirror of
https://github.com/2009scape/2009scape.github.io.git
synced 2024-09-12 03:12:30 +02:00
12 lines
451 B
JavaScript
12 lines
451 B
JavaScript
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);
|
|
}
|