Re: Reading a legacy file format
Re: Reading a legacy file format
- Subject: Re: Reading a legacy file format
- From: Scott Anguish <email@hidden>
- Date: Mon, 7 Apr 2003 21:49:44 -0400
On Monday, April 7, 2003, at 09:28 PM, David Sinclair wrote:
Another issue is how to convert Pascal strings to NSStrings; there
doesn't seem to be a method to do that directly. Is there some C
function like ptoc or similar that will do the Pascal to C conversion,
then use NSString's stringWithCString, or should I roll my own? Or
read the length byte and use stringWithCString:length:?
Actually, there is more or less
CFStringCreateWithPascalString Creates an immutable CFString object
from a Pascal string.
This'll give you a CFString which you can than cast to an NSString
<
http://developer.apple.com/techpubs/macosx/CoreFoundation/Reference/
CFStringRef/Reference/function_group_1.html#//apple_ref/c/func/
CFStringCreateWithPascalString>
_______________________________________________
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.