Open markrickert opened 9 years ago
The NSPredicate format for doing this is appending [cd] to the end of the condition, for example:
NSPredicate
[cd]
# Would match "Mark" and "mark" NSPredicate.predicateWithFormat("name CONTAINS[cd] %@", 'ar')
Thoughts on an api for this? Or should we just notate it in the documentation and people can create their own where() statements?
where()
You can do this with .where(:name).eq("ar", NSCaseInsensitivePredicateOption) which admittedly does not roll right off the tongue. We could make friendlier version with symbols.
.where(:name).eq("ar", NSCaseInsensitivePredicateOption)
The
NSPredicate
format for doing this is appending[cd]
to the end of the condition, for example:Thoughts on an api for this? Or should we just notate it in the documentation and people can create their own
where()
statements?