Javascript String trimEnd(s)

Description

Javascript String trimEnd(s)


String.prototype.trimEnd = function(s) {
    return this.replace(new RegExp(s + "+$", "gm"), "")
}



PreviousNext

Related