NSDiacriticInsensitivePredicateOption not supported by Realm

為{幸葍}努か 提交于 2019-12-01 21:29:06

Realm Objective-C v2.5.0 added support for the diacritic-insensitive modifier on most string operations. All supported string comparison operators except LIKE now support the [d] modifier.

Note that there is a performance tradeoff in performing a diacritic-insensitive comparison. If you're doing very frequent lookups it may be preferable to pre-compute a version of the string with the diacritics stripped and store it in a second property on your model. You could then use the diacritic-free property in queries, while continuing to use the original property for display purposes. If you have existing data stored in your Realm, you can add the extra property to your class and populate it for existing objects within a migration.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!