Re: NSString -componentsSeparatedByString: line break
Re: NSString -componentsSeparatedByString: line break
- Subject: Re: NSString -componentsSeparatedByString: line break
- From: Chase Meadors <email@hidden>
- Date: Mon, 27 Jul 2009 12:36:27 -0500
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 (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
_______________________________________________
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