Re: printf with "%@"
Re: printf with "%@"
- Subject: Re: printf with "%@"
- From: Dirk Stegemann <email@hidden>
- Date: Fri, 11 Aug 2006 19:47:39 +0300
Hi,
Am 11.08.2006 um 19:26 schrieb Roland Silver:
That takes care of the example I gave, but not the general case
where one wants a format that includes "%@".
As far as I know, when passing an object reference to NSLog, it
retrieves the NSString to be printed by sending the "description"
message to that object.
So, 1) replacing "NSLog" by "printf", 2) replacing "%@" by "%s" and
3) passing the const char* obtained through sending
"cStringUsingEncoding:" (or "UTF8String:" as Greg pointed out) to the
description NSString of the object in question should simulate
NSLog's behaviour pretty well.
What am I missing here? Can you give an example where those
replacements wouldn't fit your needs?
Best regards,
Dirk Stegemann
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden