ios 判断字符串是否为中文

+ (BOOL)isChineseWithStr:(NSString *)str
{
    for(int i=0; i< [str length];i ++)
    {
        int a = [str characterAtIndex:i];
        
        if( a > 0x4e00 && a < 0x9fff)
        {
            return YES;
        }
        else
        {
            return NO;
        }
    }
    return NO;
}

推荐阅读更多精彩内容