title: split a binary string with null bytes inside
body: <p>Let a binary string composed of messages separated by one null byte:  </p>
  
  <pre><code>&lt;message&gt;&lt;null&gt;&lt;message&gt;&lt;null&gt; ... &lt;message&gt;&lt;null&gt;
  </code></pre>
  
  <p>I would like to split them. Easy, I do:</p>
  
  <pre><code>binary:split(Bin,&lt;&lt;0&gt;&gt;,[global]),
  </code></pre>
  
  <p>But ...<br>
  But one message is composed of two parts:</p>
  
  <pre><code>&lt;length&gt;&lt;texte&gt;
  </code></pre>
  
  <p>length has a 4-bytes fixed size and the length can have null bytes !<br>
  Then the split function cannot cut correctly the string.<br>
  Does exist a way according to erlang state of art ?</p>