Javascript String trimRight()

Description

Javascript String trimRight()

String.prototype.trimRight = function()
{
    return this.replace(/(\s*$)/g, "");
}

Javascript String trimRight()

String.prototype.trimRight = String.prototype.trimRight || function() {
  return this.replace(/\s+$/,'');
};



PreviousNext

Related