Javascript String trimStart(s)

Description

Javascript String trimStart(s)


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



PreviousNext

Related