IOS 开发中判断字符串是否为空字符的方法
2014-12-23 13:06
281 查看
- (BOOL) isBlankString:(NSString *)string {
if (string == nil || string == NULL) {
return YES;
}
if ([string isKindOfClass:[NSNull class]]) {
return YES;
}
if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
return YES;
}
return NO;
}
if (string == nil || string == NULL) {
return YES;
}
if ([string isKindOfClass:[NSNull class]]) {
return YES;
}
if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
return YES;
}
return NO;
}
相关文章推荐
- IOS 开发中判断字符串是否为空字符的方法
- IOS开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- iOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS开发中判断字符串是否为空字符的方法
- iOS开发之 判断字符串的第一个字符是否是中文或者字母开头
- IOS开发判断在字符串中是否包含相应的字符
- IOS开发判断在字符串中是否包含相应的字符
- iOS之判断字符串是否为空字符的方法
- (iOS开发)判断字符串中是否含有非ASCII码字符
- 【iOS开发】判断NSString中的字符是否为中文的正确方法
- ObjectiveC开发教程--如何判断字符串是否为空的方法
- iOS 判断字符串是否含有某种字符