聚合云播

排序

鼠胆英雄剧情简介

"; NSArray *arr = @[@"1、(" ,@"),2、(" ,@"),3、(" ,@"),4、(" ,@"),5、(" ,@"),6、(" ,@"),7、(" ,@"),8、(" ,@"),9、(" ,@"),10、(" ,@")。"]; BOOL isZH = [ZLUtils isChineseString:text]; if (isZH) { NSString *str = [self getllUnitsByString:text]; NSString *str1 = [str substringFromIndex:1]; self.myLabel.text = [NSString stringWithFormat:@"%@%@",str1,arr[arc4random_uniform(10)]]; }else { self.myLabel.text = [NSString stringWithFormat:@"请优化中文内容的描述~"]; }}#pragma mark- 获取中文字符串- (NSString *)getllUnitsByString:(NSString *)string { NSMutableString *str = [NSMutableString string]; for (int i = 0;i < string.length ;i ) { if ([ZLUtils isChineseString:[NSString stringWithFormat:@"%c",[string characterAtIndex:i]]]) { [str appendString:[NSString stringWithFormat:@"%c",[string characterAtIndex:i]]]; } } return str;}@end