Javascript String hasString(source)

Description

Javascript String hasString(source)


String.prototype.hasString=function(source){
    if(typeof source == 'object'){
        for(var i= 0,j=source.length;i<j;i++)
            if(!this.hasString(source[i])) return !1;
        return !0;
    }//from   www .  jav  a2 s  .  co  m
    if(this.indexOf(source) != -1) return !0;
};



PreviousNext

Related