What's the “cdl” do in TOKENMATCHES[cdl]?

半城伤御伤魂 提交于 2019-12-03 17:36:16

Found it, at least!

The doc: NSComparisonPredicateOptions

typedef enum NSComparisonPredicateOptions : NSUInteger {
    NSCaseInsensitivePredicateOption = 0x01,      //==> [c]
    NSDiacriticInsensitivePredicateOption = 0x02, //==> [d]
    NSNormalizedPredicateOption = 0x04            //==> [n]
} NSComparisonPredicateOptions;

+ NSLocaleSensitivePredicateOption                //==> [l]

So basically :
[c]: uppercase is the same as lowercase (ie: A == a)
[d]: char with diacritics (acute accent, cedilla, etc.) is the same as char without it (ie à == a (accent)
[l]: it's for localized specificities. The Apple sample is with "straße" and "strasse" using the German "double s" (Eszett) as an example.

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