[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #20169] NSPredicate failed to find substring with 'IN' operation
From: |
Yen-Ju Chen |
Subject: |
[bug #20169] NSPredicate failed to find substring with 'IN' operation |
Date: |
Wed, 13 Jun 2007 23:06:52 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.1.4) Gecko/20060601 Firefox/2.0.0.4 (Ubuntu-edgy) |
URL:
<http://savannah.gnu.org/bugs/?20169>
Summary: NSPredicate failed to find substring with 'IN'
operation
Project: GNUstep
Submitted by: yjchen
Submitted on: Wednesday 06/13/2007 at 19:06
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
'CONTAINS' works:
NSString *string = @"AABBBAA";
p = [NSPredicate predicateWithFormat: @"%@ CONTAINS %@", @"AABBBAA",
@"BBB"];
UKTrue([p evaluateWithObject: string]);
But 'IN' fails:
NSString *string = @"AABBBAA";
p = [NSPredicate predicateWithFormat: @"%@ IN %@", @"BBB", @"AABBBAA"];
UKTrue([p evaluateWithObject: string]);
Here is the description of 'IN' for Cocoa:
NSInPredicateOperatorType
A predicate to determine if the left hand side is in the right hand
side.
For strings, returns YES if the left hand side is a substring of the
right hand side . For collections, returns YES if the left hand side is in
the right hand side .
Available in Mac OS X v10.4 and later.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20169>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #20169] NSPredicate failed to find substring with 'IN' operation,
Yen-Ju Chen <=