title: Swift3: How to create a char**?
body: <p>I try to call a C function from a dynamic library from Swift (3). 
  I want to do mirror the function call as in the following c example. </p>
  
  <p>This is the function declaration</p>
  
  <pre><code>extern int parseArgs(int argc, char **argv);
  </code></pre>
  
  <p>And this is the correct use of it:</p>
  
  <pre><code>char* args[] = {"-arg1","-arg2","-arg3"};
  parseArgs (sizeof(args)/sizeof(char*), args);
  </code></pre>
  
  <p>So far, I have been able to convert Strings into the right format. This is what I am using. </p>
  
  <pre><code>typealias CHAR = UnsafeMutablePointer&lt;Int8&gt;
  func cString(_ s: String) -&gt; CHAR {
      return UnsafeMutablePointer&lt;Int8&gt;(mutating: (s as NSString).utf8String!)
  }
  </code></pre>
  
  <p>So far, so good. Now, how do I continue?</p>
  
  <pre><code>typealias CHAR_ARRAY = UnsafeMutablePointer&lt;CHAR?&gt;
  </code></pre>
  
  <p>This seems to be the correct type. But I cannot do the instantiation. And knowing me and my lack of low level programming: even above CHAR solution is not ideally. How would you call the <code>parseArgs</code> function?</p>