Re: Save Plain Text
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.