1 +(BOOL)IsChinese:(NSString *)str 2 { 3 for(int i=0; i< [str length];i++) 4 { 5 int a = [str characterAtIndex:i]; 6 if( a > 0x4e00 && a < 0x9fff) 7 { 8 return YES; 9 } 10 11 } 12 return NO; 13 }
时间: 2024-10-14 12:41:08
1 +(BOOL)IsChinese:(NSString *)str 2 { 3 for(int i=0; i< [str length];i++) 4 { 5 int a = [str characterAtIndex:i]; 6 if( a > 0x4e00 && a < 0x9fff) 7 { 8 return YES; 9 } 10 11 } 12 return NO; 13 }