logo
  • 教程列表
  • SO官方文档
  • NSPredicate
    • 按名称过滤
    • 查找除给定 ID 之外的电影
    • 找到所有类型为 movie 的对象
    • 找到数组的不同对象 ID
    • 查找具有特定 ID 的电影
    • 案例与精确标题匹配的不敏感比较
    • 区分大小写与完全标题匹配
    • 案例与匹配子集的不敏感比较
  1. StackOverflow 文档
  2. Objective-C Language 教程
  3. NSPredicate
  4. 案例与匹配子集的不敏感比较

案例与匹配子集的不敏感比较

Created: November-22, 2018

// *** Case Insensitive comparison with matching subset ***
NSPredicate *filterByName = [NSPredicate predicateWithFormat:@"self.title CONTAINS[cd] %@",@"Tom"];
NSLog(@"Filter By Containing Name : %@",[array filteredArrayUsingPredicate:filterByName]);
  • 区分大小写与完全标题匹配

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明