简体   繁体   English

Leopard似乎不支持运算符@“%@ == [c]%@”。 那我该怎么用呢?

[英]the operator @“%@ ==[c] %@” seems not supported on Leopard. What should I use then?

the operator ==[c] like in @"%@ ==[c] %@" seems not supported on Leopard. Leopard似乎不支持运算符==[c]例如@"%@ ==[c] %@"

What operator should I use to compare strings with different casing ? 我应该使用什么运算符来比较具有不同大小写的字符串?

Thanks 谢谢

You could try calling 您可以尝试致电

- (NSComparisonResult)caseInsensitiveCompare:(NSString *)aString

Or another method might be using 或其他方法可能正在使用

[[string1 lowercaseString] isEqualToString:[string2 lowercaseString]];

我认为这将起作用: @"%@ LIKE[c] %@"

如果比较的左侧是属性名称,则需要使用%K说明符

@"%K ==[c] %@"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM