<05>判断字符串是否为空

/**
 * 判断字符串是否为空
 * &-originstring 待传入字符串
 * 返回一个BOOL值:YES为空
 */
+ (BOOL)isBlankString:(NSString *)originstring;
/**
 *  判断字符串是否为空
 */
+ (BOOL)isBlankString:(NSString *)originstring{
   
   
    if (originstring == nil) {
        return YES;
    }
    if ([originstring isEqualToString:@" "]) {
        return YES;
    }
    if (originstring == NULL) {
        return YES;
    }
    if ([originstring isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if (originstring.length == 0) {
        return YES;
    }
    return NO;
   
}
原文地址:https://www.cnblogs.com/iQingYang/p/6687887.html