#pragma mark 中文判断
+ (BOOL)isValidateChinese:(NSString *)chinese
{
NSString * phoneRegex = @"^[\u4E00-\u9FA5]*$"; //中文正则表达式
NSPredicate * chinesePred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", phoneRegex];
return [chinesePred evaluateWithObject:chinese];
}
网友评论