• 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: Reading a plain text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading a plain text file


  • Subject: Re: Reading a plain text file
  • From: Andrew Merenbach <email@hidden>
  • Date: Sat, 21 Jan 2006 20:19:51 -0800

Hi, Chad. I do believe that you'll want NSString's initializer method -initWithContentsOfFile:encoding:error: to read the contents into a string, and then you can write an algorithm to parse the string from there.

Cheers,
	Andrew

On Jan 21, 2006, at 7:52 PM, Chad Armstrong wrote:

I have a plain text file I'm trying to read, and I want to place its contents into an object, such as an NSString. For something which is probably fairly trivial, I'm just not finding the answer I'm looking for. I've worked some with NSArchiver and NSUnarchiver, but that seems to work a little better with data saved in an XML format, while the file I'm trying to read is just a plain text file (no XML formating or anything of the sorts). What am I missing here? Thanks.

Chad
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40ucla.edu


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
References: 
 >Reading a plain text file (From: Chad Armstrong <email@hidden>)

  • Prev by Date: Re: Reading a plain text file
  • Next by Date: NSImage NSInternalInconsistencyException
  • Previous by thread: Re: Reading a plain text file
  • Next by thread: Re: Reading a plain text file
  • Index(es):
    • Date
    • Thread