Javascript String isWhitespace()

Description

Javascript String isWhitespace()

String.prototype.isWhitespace = function(){
    var match = this.match(/\s*/);
    if(match == null){
        return false;
    }/* ww  w .  j av  a  2  s.  c om*/
    return  match[0] == this;
}



PreviousNext

Related