• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: print object by %@
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: print object by %@


  • Subject: Re: print object by %@
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 22 Jul 2010 13:57:10 -0500

On Jul 22, 2010, at 1:44 PM, Ariel Feinerman wrote:

> you are right, I wish to get a function can use printf style, prints
> Objective-C objects clearly and efficiently  by %@,
>
> I do not understand, hm, why there is no such function (except NSLog())  in
> Cocoa?

You've been given all of the tools.  It's simple to write such a function yourself based on what you've been given (although you will have to delve into stdarg, a bit, and -[NSString initWithFormat:arguments:]).

> -desription message can return localized NSString, so using of utf16 is
> necessity

That does not follow.  UTF-8 is capable of representing everything that UTF-16 can represent.  They are two ways of encoding the same underlying data.  If you're outputting to stdout or stderr, then the receiver is most likely expecting UTF-8.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >print object by %@ (From: Ariel Feinerman <email@hidden>)
 >Re: print object by %@ (From: Jean-Daniel Dupas <email@hidden>)
 >Re: print object by %@ (From: Ariel Feinerman <email@hidden>)
 >Re: print object by %@ (From: "Stephen J. Butler" <email@hidden>)
 >Re: print object by %@ (From: Ariel Feinerman <email@hidden>)

  • Prev by Date: Re: Array controllers in code?
  • Next by Date: Re: print object by %@ [solved]
  • Previous by thread: Re: print object by %@
  • Next by thread: Re: print object by %@
  • Index(es):
    • Date
    • Thread