- 找到在array1中不在array2中的数据
NSPredicate * filterPredicate1 = [NSPredicate predicateWithFormat:@"NOT (SELF IN %@)", array2];
NSArry *newArr = [array1 filteredArrayUsingPredicate:filterPredicate1];
NSPredicate * filterPredicate1 = [NSPredicate predicateWithFormat:@"NOT (SELF IN %@)", array2];
NSArry *newArr = [array1 filteredArrayUsingPredicate:filterPredicate1];
本文标题:iOS-两数组的差集
本文链接:https://www.haomeiwen.com/subject/vtkzxctx.html
网友评论