Javascript String fulltrim()

Description

Javascript String fulltrim()

String.prototype.fulltrim = function() {
    return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g, '').replace(/\s+/g, ' ');
};



PreviousNext

Related