-(BOOL)isChinese{
NSString *match=@"(^[\\u4e00-\\u9fa5]+$)";
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF matches %@", match];
return [predicate evaluateWithObject:self];
}
-(BOOL)isChinese{
NSString *match=@"(^[\\u4e00-\\u9fa5]+$)";
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF matches %@", match];
return [predicate evaluateWithObject:self];
}
本文标题:判断字符串是否是中文
本文链接:https://www.haomeiwen.com/subject/kdgdkttx.html
网友评论