title: Printing an NSString
body: <p>What's the correct way to print an NSString in Objective-C? A lot of examples use NSLog(), but according to the documentation:</p>
  
  <blockquote>
    <p>NSLog is a FoundationKit function for printing debug statements to the console.
    ...
    NSLog works basically like:
      fprintf(stderr, format_string, args ...);</p>
  </blockquote>
  
  <p>Which to me is a bit like the _TRACE macro in Win32/C++. I don't want to print to stderr, I want to print to stdout.  There are people who suggest using printf() as follows:</p>
  
  <pre><code>printf("%s", [str cStringUsingEncoding:NSUTF8StringEncoding]);
  </code></pre>
  
  <p>But this seems like an extra level on indirection to get the NSString printed, and it doesn't "feel" like the solution.</p>