title: splitting a string using '\0'
body: <p>let's say I have a char* <code>./a.out\0a\0b\0\0</code>.
  I want to split it and the result to be a char** of value</p>
  <pre><code>{
      &quot;./a.out\0&quot;,
      &quot;a\0&quot;,
      &quot;b\0&quot;,
      &quot;\0&quot;
  }
  </code></pre>
  <p>I'm using pure c + POSIX but if an answer contains parts of the c++STL I don't mind that, just avoid the memory inefficient ones like std::string</p>