• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Predicate and beginswith
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Predicate and beginswith
      • From: Joel Levin <email@hidden>
  • Prev by Date: [JOB] We need Cocoa Developers in Austin
  • Next by Date: Re: Opening Drawers to given size
  • Previous by thread: [JOB] We need Cocoa Developers in Austin
  • Next by thread: Re: Predicate and beginswith
  • Index(es):
    • Date
    • Thread