Re: [Advice] Inspecting a Plain Text File
Re: [Advice] Inspecting a Plain Text File
- Subject: Re: [Advice] Inspecting a Plain Text File
- From: Andy Satori <email@hidden>
- Date: Wed, 9 Mar 2005 12:08:40 -0500
This should do the trick...
NSArray *lineInFile = [[[NSString alloc]
initWithFile:yourFileName]
componentsSeparatedByString:@"/n"];
Andy
On Mar 9, 2005, at 11:59 AM, Kodex wrote:
Hey Guys,
I am working on a program that will load and look at a
plain text file under <1MB tops but most likely much
smaller. Once loaded i want to compare this text file
to another one line by line and be able to label what
lines are diffrent from the previous file.
I was looking into NSData and NSString, loading it in
as NSData then converting it to strings but how can i
pull it apart by line number? Do a string search for a
new line then mark a new one? Is there a set limit
that can be stored in an NSString or will it be able
to support such a large amount of data.
Just looking for some insight and advice from anyone
who might of done this before or knows a decent way to
do it. Thanks in advance for your help. Hopefully its
less painful that im working it through in my head
right now.
Thanks!
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden