title: Swift, stringWithFormat, %s gives strange results
body: <p>I searched for an answer the entire day but nothing really came close to answering my issue. I am trying to use stringWithFormat in Swift but while using printf format strings. The actual issue I have is with the %s. I can't seem to get to the original string no matter how I try this. </p>
  
  <p>Any help would be much much appreciated (or workarounds). 
  Things I already did: tried all available encodings for the cString, tried creating an ObjC function to use for this, but when I passed the arguments from Swift I ran into the same strange issue with the %s, even if when hardcoded in the ObjC function body it appears to print the actual correct String. </p>
  
  <p>Please find bellow the sample code.</p>
  
  <p>Many thanks!</p>
  
  <pre><code>var str = "Age %2$i, Name: %1$s"
  let name = "Michael".cString(using: .utf8)!
  let a = String.init(format: str, name, 1234)
  </code></pre>
  
  <p>Expected result is quite clear I presume, however I get something like this instead of the correct name:</p>
  
  <pre><code>"Age 1234, Name: ÿQ5"
  </code></pre>