/**
判断字符串是否为空的处理,如果是空的,则返回长度为0的字符串@“”, 否则返回字符串
@param string 未知的对象
@return 返回字符串
*/
+ (NSString *)nullToString:(id)string {
if ([string isEqual:@"NULL"] || [string isKindOfClass:[NSNull class]] || [string isEqual:[NSNull null]] || [string isEqual:NULL] || [[string class] isSubclassOfClass:[NSNull class]] || string == nil || string == NULL || [string isKindOfClass:[NSNull class]] || [[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length]==0 || [string isEqualToString:@"<null>"] || [string isEqualToString:@"(null)"]) {
return @"";
} else {
return (NSString *)string;
}
}