Javascript String trimStr(s)

Description

Javascript String trimStr(s)


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



PreviousNext

Related