Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manajay/de9432c67df308bad485ccd00edb2ffc to your computer and use it in GitHub Desktop.
Save manajay/de9432c67df308bad485ccd00edb2ffc to your computer and use it in GitHub Desktop.
比较字符串是否在数组中, 忽略大小写
// 比较字符串是否在数组中, 忽略大小写 参考 https://segmentfault.com/a/1190000000623005
NSPredicate *p = [NSPredicate predicateWithFormat:@"SELF ==[cd] %@",self];
NSArray *r = [strings filteredArrayUsingPredicate:p];
return r.count > 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment