title: One more string implementation in C: advantages and disadvantages
body: <p>After reading the article <a href="http://joelonsoftware.com/articles/fog0000000319.html" rel="nofollow noreferrer">"Back to Basics"</a> by Mr.Spolsky I have thought about string structure in C, that converges most of advantages of Pascal-style string (with length byte) and classic ASCIIZ-strings in C and reduces most of their disadvantages. The main demand is to make this new string effective in machine commands. (for this task I assume, that every character is single byte. Excuse me. :) ) </p>
  
  <p>My idea is to store strings (that also can contain zero bytes) in byte array of such structure:</p>
  
  <ul>
  <li><strong>0</strong> - length in bytes of string length presentation (value is 1 or more);</li>
  <li><strong>1..presLength+1</strong> - string length presentation (1 or more bytes; may have fixed length (that processes simpler, but determines string length limit) or not);</li>
  <li><strong>presLength+2..arrrayLength</strong> - string content.</li>
  </ul>
  
  <p>I expect this approach can solve most of the problems noticed by Mr.Spolsky, but suppose, that there are some lacks. I want to know you opinion. What do you think about it?</p>