Javascript String replace_all(search, replacement)

Description

Javascript String replace_all(search, replacement)


String.prototype.replace_all = function(search, replacement){
    var target = this;
    return target.split(search).join(replacement);
}



PreviousNext

Related