Files
2011-07-02 17:31:04 +02:00

22 lines
484 B
JavaScript

String.prototype.replaceAll = function(
strTarget,
strSubString
){
var strText = this;
var intIndexOfMatch = strText.indexOf( strTarget );
while (intIndexOfMatch != -1)
{
strText = strText.replace( strTarget, strSubString )
intIndexOfMatch = strText.indexOf( strTarget );
}
return(strText);
}
String.prototype.urifyAll = function(){
var strText = this;
var text = unescape(decodeURI(strText).replaceAll("+", " "));
return(text);
}