-(BOOL)isChineseCharacterAndLettersAndNumbersAndUnderScore:(NSString *)string
{
int len=string.length;
for(int i=0;i<len;i++)
{
unichar a=[string characterAtIndex:i];
if(!((isalpha(a))
||(isalnum(a))
||((a==‘_‘))
||((a >= 0x4e00 && a <= 0x9fa6))
))
return NO;
}
return YES;
}
时间: 2024-10-06 10:06:53