title: Send a NSString with \0
body: <p>I am trying to send a string terminated with \0 to a tcp socket but it seems the \0 does never reach its destination.</p>
  
  <p>Using this code:</p>
  
  <pre><code>NSString* s=@"&lt;b/&gt; \0_";
  
  uint8_t *buf = (uint8_t *)[s UTF8String];
  
  int resCode = [outputStream write:buf maxLength:strlen((char *)buf)];
  </code></pre>
  
  <p>I only seem to send <code>@"&lt;b/&gt; "</code>. Probably the <code>\0</code> is seen as the end of the <code>uint8_t</code>.</p>
  
  <p>Can someone tell me how it should be done??</p>