title: Swift3: Proper way to convert string to null-terminated C-string
body: <p>I am interfacing with libxml2 in swift, and the C APIs binding (still) produce <code>UnsafePointer&lt;Int8&gt;!</code> for c-strings. Whereas Swift APIs normally result in <code>UnsafePointer&lt;UInt8&gt;!</code>.</p>
  
  <p>So my question is - am I doing the string to null-terminated C-string in a proper way?</p>
  
  <pre><code>let cfilePath = unsafeBitCast(myStringString.nulTerminatedUTF8.withUnsafeBufferPointer { $0.baseAddress }, to: UnsafePointer&lt;Int8&gt;.self)
  </code></pre>
  
  <p>Should I instead prefer using some other method instead of just bypassing Swift type checking with interpreting <code>UInt8</code> bytes as <code>Int8</code> bytes?</p>