IOS 开发中判断字符串是否为空字符的方法
2013-10-22 14:43
309 查看
- (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;
}
转自:http://blog.csdn.net/qijianli/article/details/8463315
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;
}
转自:http://blog.csdn.net/qijianli/article/details/8463315
相关文章推荐
- IOS 开发中判断字符串是否为空字符的方法
- IOS开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- iOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- IOS开发中判断字符串是否为空字符的方法
- IOS 开发中判断字符串是否为空字符的方法
- iOS开发之 判断字符串的第一个字符是否是中文或者字母开头
- (iOS开发)判断字符串中是否含有非ASCII码字符
- IOS开发判断在字符串中是否包含相应的字符
- iOS之判断字符串是否为空字符的方法
- 【iOS开发】判断NSString中的字符是否为中文的正确方法
- IOS开发判断在字符串中是否包含相应的字符
- 通过JS,Jquery判断某个字符在一个字符串中是否存在的方法
- Asp.Net判断一个字符串是否包含某个字符的最简单方法!(示例)