私は非常に単純な NSPredicate を持っています:
NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"name beginswith '%@'", theString];
[matchingTags filterUsingPredicate:sPredicate];
これにより、theString == "p" の場合、配列の結果は 0 になります。
ただし、これを行うと:
NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"name beginswith 'p'"];
[matchingTags filterUsingPredicate:sPredicate];
予想どおり、100 を超える結果が得られます。
NSLog() で "theString" を確認しましたが、その値は正しいです。重大な秘密を見逃しているような気がします。おそらく、文字ではなく文字列を使用しているためでしょうか?
考え?