• 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: Save Plain Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save Plain Text


  • Subject: Re: Save Plain Text
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 6 Jul 2002 23:10:27 +0200

On Saturday, July 6, 2002, at 09:33 , John Anderson wrote:

Perhaps I'm misunderstanding your question, but assuming that it's an NSString that you want to save to a file, just use something like this:

NSString *myNeatoString = @"Hello, world!";
NSString *myFilePath = @"/Users/Shared/hello.txt";

[myNeatoString writeToFile:myFilePath atomically:YES];

Unless myNeatoString might contain foreign characters, in which case dataWithEncoding:... is needed (and the result NSData is to be written out the same way).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Save Plain Text (From: John Anderson <email@hidden>)

  • Prev by Date: Re: accessor generation???
  • Next by Date: Re: Cocoa stripping resource forks: does Jaguar fix?
  • Previous by thread: Re: Save Plain Text
  • Next by thread: combo box questions
  • Index(es):
    • Date
    • Thread