Re: Getting line numbers from an NSString
Re: Getting line numbers from an NSString
- Subject: Re: Getting line numbers from an NSString
- From: j o a r <email@hidden>
- Date: Fri, 11 Apr 2008 10:31:26 -0700
On Apr 11, 2008, at 10:23 AM, allan greenier wrote:
If I have an NSString that is multi lined (say in contains "\n"
characters)
is there an api call so I can get line 0, line 1, ect? Or should I
just code that myself?
There is no "NSLineEnumerator" (although that would be a very cool
addition), you basically have to do it manually.
NSString has a method to help you identify line endings in case you
have to deal with files that could use different characters /
character sequences to represent that (\n, \r, et.c.).
j o a r
_______________________________________________
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