IsFilled(), IsEmpty()

String.prototype.IsFilled = function () {
    if (this && this.length > 0) {
        return true;
    }
    return false;
}
 
String.prototype.IsEmpty = function () {
    return !this.IsFilled();
}
Example:
return filter.IsFilled();

Description

Returns if a string is null or empty

Details

Double click on the code to select all.

 

;