Created
August 29, 2019 15:47
-
-
Save manajay/de9432c67df308bad485ccd00edb2ffc to your computer and use it in GitHub Desktop.
比较字符串是否在数组中, 忽略大小写
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 比较字符串是否在数组中, 忽略大小写 参考 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