标签:内容 nbsp turn nec min return ret and else
//判断是否全是空格
- (BOOL)isEmpty:(NSString *) str {
if (!str) {
return YES;
} else {
NSCharacterSet *set = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSString *trimedString = [str stringByTrimmingCharactersInSet:set];
if ([trimedString length] == 0) {
return YES;
} else {
return NO;
}
}
}
标签:内容 nbsp turn nec min return ret and else
原文地址:http://www.cnblogs.com/zhufengshibei/p/7509715.html