On Thu, Jul 22, 2010 at 12:57 PM, Ariel Feinerman <[email protected]> wrote:
> Thank you for yours, but I am looking for more convenient way, I mean a
> function for console output, not for debugging like NSLog(),
>
> so I wish:
>
> NSLog(@"object is %@", obj);
> // $ object is [object description]
>
> I would not wish to convert NSString to utf8 for printf(), I wish to use
> NSString

If you REALLY want to avoid C stdio...

I think the closest you'll get is [NSFileHandle
fileHandleWithStandardOutput]. But even then, NSFileHandle writes
NSData objects, not NSStrings. So you'll still need something like
[myString dataUsingEncoding:NSUTF8StringEncoding]. Which is really
what you want anyway since most people's terminals are setup to accept
UTF-8.
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to