批量生成假的手机号
2018-05-15 本文已影响18人
胖笋
NSArray* haoduan=@[@(135),@(136),@(137),@(138),@(139),@(189),@(133),@(131)];
NSString* phoneString = @"";
for (int i=0; i<1000; i++) {
NSInteger hdKey = arc4random()%8;
NSInteger phoneNum = arc4random()%88888888+10000000;
phoneString = [phoneString stringByAppendingFormat:@"%@%ld,",haoduan[hdKey],phoneNum]; }
NSLog(@"%@",phoneString);