[@"2023年10月" compare:@"2023年9月" options:NSLiteralSearch] 返回值为 NSOrderedAscending
[@"2023年10月" compare:@"2023年9月" options:NSNumericSearch] 返回值为 NSOrderedDescending
NSNumericSearch 是将字符中的数字对比,202310 > 20239;
NSLiteralSearch 是将字符中每个 character 逐个对比,2023年1 < 2023年9;









网友评论