Predicate and beginswith
Predicate and beginswith
- Subject: Predicate and beginswith
- From: Brian Amerige <email@hidden>
- Date: Mon, 21 May 2007 20:44:08 -0400
Hi there list,
I've got an array (allKeys) which is filled with HTML tags -- things
like "<html>", "<form>", etc.. I'm filtering it using predicates, so
I can accurately complete tags.
Here's what I've got:
NSArray *allKeys = [coloringEngine allKeys]; // this just returns
the array I mentioned above.
NSPredicate *stringToCompletePredicate = [NSPredicate
predicateWithFormat:@"SELF beginswith[cd] %@", stringToComplete]; //
stringToComplete is something like "<htm"
allKeys = [allKeys
filteredArrayUsingPredicate:stringToCompletePredicate];
But this seems to return nothing --- certainly not what I'd expect. I
expect it to return "<html>" assuming stringToComplete was something
like "<htm", but it returns an empty array.
Any suggestions?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden