• 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 on a string length?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Predicate on a string length?


  • Subject: Predicate on a string length?
  • From: email@hidden
  • Date: Wed, 20 Jun 2007 11:29:35 -0700

For a Core Data app, I'm trying to create a predicate so that it can return NSStrings that are a specified length.
I've tried a few variations with no luck. This is one of the variations:


The property name of the string is "text".
NSNumber* theNum = [NSNumber numberWithInt:5];
[NSPredicate predicateWithFormat:@"(text.length <= %@)" , theNum];

That doesn't work.  Is what I want possible?  If so, any suggestions?

Thanks!
-Bill

_______________________________________________

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


  • Prev by Date: Re: Cocoa API's for Printers.
  • Next by Date: request for advice on using Core Data
  • Previous by thread: Re: Shockwave integration
  • Next by thread: request for advice on using Core Data
  • Index(es):
    • Date
    • Thread