• 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
Re: NSString -componentsSeparatedByString: line break
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString -componentsSeparatedByString: line break


  • Subject: Re: NSString -componentsSeparatedByString: line break
  • From: Kirk Kerekes <email@hidden>
  • Date: Mon, 27 Jul 2009 19:27:18 -0500

How about:

[array filterUsingPredicate:[NSPredicate predicateWithFormat:@"SELF.length > 0"]];

"LIKE" is awfully fancy for the purpose.

On Jul 27, 2009, at 2:03 PM, email@hidden wrote:

Date: Mon, 27 Jul 2009 12:36:27 -0500
From: Chase Meadors <email@hidden>
Subject: Re: NSString -componentsSeparatedByString: line break
To: Cocoa-Dev List <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Thanks guys, except now I'm having a new problem. My array of lines is
now containing empty strings that actually report a length of zero.
This would be fine, except when I try to filter the array to get rid
of these empty lines,

[array filterUsingPredicate:[NSCompoundPredicate
notPredicateWithSubpredicate:[NSPredicate predicateWithFormat:@"SELF
LIKE %@", @""]]];

this code has no affect. These empty strings have a length of 0 so
they would have to be just empty strings. Other filtering predicates
work fine. Is this a problem with the predicate?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Dynamic UI with scroll view
  • Next by Date: NSString and regular expressions
  • Previous by thread: Re: NSString -componentsSeparatedByString: line break
  • Next by thread: NSCoder Chicago Reminder Monday Night
  • Index(es):
    • Date
    • Thread