开发者

How to compare Chinese strings in English environment?

I'm trying to compare Chinese strings with NSString - (NSComparisonResult)localizedS开发者_如何学运维tandardCompare:(NSString *)string method.

It works correctly if the system language is set to Chinese. But in English language environment, the strings is compared by something like unicode number. How can I compare strings with Chinese style in English environment?


Use - (NSComparisonResult)compare:(NSString *)aString options:(NSStringCompareOptions)mask range:(NSRange)range locale:(id)locale instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜