How about:
[array filterUsingPredicate:[NSPredicate
predicateWithFormat:@"SELF.length > 0"]];
"LIKE" is awfully fancy for the purpose.
On Jul 27, 2009, at 2:03 PM, cocoa-dev-requ...@lists.apple.com wrote:
Date: Mon, 27 Jul 2009 12:36:27 -0500
From: Chase Meadors <c.ed.m...@gmail.com>
Subject: Re: NSString -componentsSeparatedByString: line break
To: Cocoa-Dev List <Cocoa-dev@lists.apple.com>
Message-ID: <e8f93d5f-f100-47ee-bf8a-a6fa26200...@gmail.com>
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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com