Javascript String trimLeft(charlist = '\s')

Description

Javascript String trimLeft(charlist = '\s')

String.prototype.trimLeft = function(charlist = '\s') {
    return this.replace(new RegExp('^[' + charlist + ']+'), '');
};



PreviousNext

Related