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?

On Jul 26, 2009, at 9:57 PM, Rob Keniger wrote:


On 27/07/2009, at 12:23 PM, Adam R. Maxwell wrote:


On Jul 26, 2009, at 7:11 PM, Greg Guerin wrote:

Chase Meadors wrote:

If the length of this mystery string is 1 and it's not a space, what is it???

Use -characterAtIndex:0 and print the returned unichar using the "%x" format.

Another sometimes-handy trick is to create a mutable copy and call CFStringTransform with kCFStringTransformToUnicodeName.


You should also look at -getLineStart:end:contentsEnd:forRange: if you're parsing lines of text, as it takes into account a variety of possible line endings, not just \n.

--
Rob Keniger



_______________________________________________

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/c.ed.mead%40gmail.com

This email sent to c.ed.m...@gmail.com

_______________________________________________

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

Reply via email to