美文网首页
批量生成假的手机号

批量生成假的手机号

作者: 胖笋 | 来源:发表于2018-05-15 16:06 被阅读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);
    

    相关文章

      网友评论

          本文标题:批量生成假的手机号

          本文链接:https://www.haomeiwen.com/subject/xzqydftx.html