NSStringCompareOptions

typedef NS_OPTIONS(NSUInteger, NSStringCompareOptions) {
    NSCaseInsensitiveSearch = 1,
    NSLiteralSearch = 2,                /* 准确的通过字符串一个个进行比较 */
    NSBackwardsSearch = 4,        /* 从后往前进行查找 */
    NSAnchoredSearch = 8,          /* 搜索从开始的位置进行查找Search is limited to start (or end, if NSBackwardsSearch) of source string */
    NSNumericSearch = 64,          /* 数字字符串进行比较 */
    NSDiacriticInsensitiveSearch NS_ENUM_AVAILABLE(10_5, 2_0) = 128, /* 忽略 "-"符号的比较*/
    NSWidthInsensitiveSearch NS_ENUM_AVAILABLE(10_5, 2_0) = 256, /*忽略字符串的长度,比较出结果 */
    NSForcedOrderingSearch NS_ENUM_AVAILABLE(10_5, 2_0) = 512, /* 忽略不区分大小写比较的选项,并强制返回 NSOrderedAscending 或者NSOrderedDescending */
    NSRegularExpressionSearch NS_ENUM_AVAILABLE(10_7, 3_2) = 1024    /* 只能应用于rangeOfString:..., stringByReplacingOccurre
ncesOfString:...和 replaceOccurrencesOfStri ng:... 方法。使用通用兼容的比较方法,如果设置此项,可以去掉NSCaseInsensitiveSearch 和 NSAnchoredSearch */

};


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值