• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Advice] Inspecting a Plain Text File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: [Advice] Inspecting a Plain Text File
      • From: Shawn Erickson <email@hidden>
References: 
 >[Advice] Inspecting a Plain Text File (From: Kodex <email@hidden>)

  • Prev by Date: [Advice] Inspecting a Plain Text File
  • Next by Date: Re: [Advice] Inspecting a Plain Text File
  • Previous by thread: [Advice] Inspecting a Plain Text File
  • Next by thread: Re: [Advice] Inspecting a Plain Text File
  • Index(es):
    • Date
    • Thread