Re: cString deprecated!
Re: cString deprecated!
- Subject: Re: cString deprecated!
- From: Finlay Dobbie <email@hidden>
- Date: Tue, 3 Sep 2002 22:06:45 +0100
On Tuesday, September 3, 2002, at 09:01 pm, Kris Amico wrote:
Forgive my ignorance, but I am wondering how the technique you describe
below is different from using NSString's lossyCString instance method?
It allows you to specify an encoding. However, I think that
dataUsingEncoding: already appends a \0, although I could be mistaken.
On 9/3/02 9:20 AM, "Matt Neuburg" <email@hidden> wrote:
- (const char*) myCString: (int) encoding {
return [[[self stringByAppendingString:
@"\0"] dataUsingEncoding: encoding
allowLossyConversion:YES]
bytes];
}
-- Finlay
_______________________________________________
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.