title: How to convert string to null-terminated one?
body: <p>How to convert a simple string to a null-terminated one?</p>
  <h3>Example:</h3>
  <p>Example string: &quot;Test message&quot;<br />
  Here are the bytes:</p>
  <pre><code>54 65 73 74 20 6D 65 73 73 61 67 65
  </code></pre>
  <p>I need string with bytes like follows:</p>
  <pre><code>54 00 65 00 73 00 74 00 20 00 6D 00 65 00 73 00 73 00 61 00 67 00 65 00 00
  </code></pre>
  <p>I could use loops, but will be too ugly code. How can I make this conversion by native methods?</p>