Javascript Object trim()

Description

Javascript Object trim()


/**//from w  ww. j a  v  a 2  s .co  m
 * trim blank character
 * 
 * @returns
 */
Object.prototype.trim = function() {
 return this.replace(/(^\s*)|(\s*$)/g, '');
}



PreviousNext

Related