zoukankan      html  css  js  c++  java
  • 数组

    一、数组去重

    - (NSArray *)arrayWithMemberIsOnly:(NSArray *)array

    {

        NSMutableArray *categoryArray = [[NSMutableArray alloc] init];

        for (unsigned i = 0; i < [array count]; i++) {

            @autoreleasepool {

                if ([categoryArray containsObject:[array objectAtIndex:i] ]== NO)

                {

                    [categoryArray addObject:[array objectAtIndex:i]];

                }

            }

        }

        return categoryArray;

     }

            //遍历

            [_arrSend enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {

                //stop=@"YES";

            }];

            //排序

            [_arrSend sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {

                

            }];

  • 相关阅读:
    tomcat监控与优化
    rpm打包
    Rewrite和location 区别
    LNMP服务
    yum仓库脚本
    用户管理的脚本2
    pxe装机脚本
    用户管理的脚本1
    磁盘管理综合测试题
    MySQL 增量备份介绍及案例演示
  • 原文地址:https://www.cnblogs.com/lvchenhao/p/4428523.html
Copyright © 2011-2022 走看看