#pragma mark - 计算文字的个数
//- (BOOL)isChinesecharacter:(NSString *)string
//{
// if (string.length == 0)
// {
// return NO;
// }
// unichar c = [string characterAtIndex:0];
// if (c >=0x4E00 && c <=0x9FA5)
// {
// return YES;//汉字
// }
// else
// {
// return NO;//英文
// }
//}
////计算汉字的个数
//- (NSInteger)chineseCountOfString:(NSString *)string
//{
// int ChineseCount = 0;
// if (string.length == 0)
// {
// return 0;
// }
// for (int i = 0; i<string.length; i++)
// {
// unichar c = [string characterAtIndex:i];
// if (c >=0x4E00 && c <=0x9FA5)
// {
// ChineseCount++;//汉字
// }
// }
// return ChineseCount;
//}
////计算字母的个数
//- (NSInteger)characterCountOfString:(NSString *)string
//{
// int characterCount = 0;
// if (string.length == 0)
// {
// return 0;
// }
// for (int i = 0; i<string.length; i++)
// {
// unichar c = [string characterAtIndex:i];
// if (c >=0x4E00 && c <=0x9FA5)
// {
// }
// else
// {
// characterCount++;//英文
// }
// }
// return characterCount;
//}
3095

被折叠的 条评论
为什么被折叠?



