Re: c2pstr
Re: c2pstr
- Subject: Re: c2pstr
- From: Philip Aker <email@hidden>
- Date: Wed, 09 Apr 2008 22:36:14 -0700
On 08-04-09, at 21:14, Charlie Dickman wrote:
Now that c2pstr is deprecated how do you convert a c string or a
Cocoa string to a pascal string for use with debugStr?
I've been using
DebugStr(c2pstr ((char *) [[NSString stringWithFormat: @"%s @ %d",
__func__, __LINE__] cStringUsingEncoding: NSASCIIStringEncoding]))
Str255 pstr = {0};
if( CFStringGetPascalString( (CFStringRef)nstr, pstr, 255,
kCFStringEncodingUTF8 ) ) {
DebugStr( pstr );
}
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >c2pstr (From: Charlie Dickman <email@hidden>) |