• 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: String causes NSLog to crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String causes NSLog to crash


  • Subject: Re: String causes NSLog to crash
  • From: "Shawn Erickson" <email@hidden>
  • Date: Fri, 24 Feb 2006 11:00:04 -0800

In summary the following is the correct way to log an NSString...

>         NSLog(@"%@", test);

The following is the wrong way to log an NSString, one that may cause
crashing or incorrect logging...

>         NSLog(test);

Just like the following is the correct way to log a c-string...

printf("%s", test);

...and the following isn't...

printf(test);

-Shawn
 _______________________________________________
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

References: 
 >String causes NSLog to crash (From: Sunil Vemuri <email@hidden>)

  • Prev by Date: Re: String causes NSLog to crash
  • Next by Date: using NSMutableDictionary in place of NSDictionary
  • Previous by thread: Re: String causes NSLog to crash
  • Next by thread: using NSMutableDictionary in place of NSDictionary
  • Index(es):
    • Date
    • Thread