//判断是否全是空格
+ (BOOL) isEmpty:(NSString *) str {
if (!str) {
return true;
} else {
NSCharacterSet *set = [NSCharacterSetwhitespaceAndNewlineCharacterSet];
NSString *trimedString = [strstringByTrimmingCharactersInSet:set];
if ([trimedString length] == 0) {
return true;
} else {
return false;
}
}
}