title: How to get byte size of multibyte string
body: <p>How do I get the byte size of a multibyte-character string in Visual C? Is there a function or do I have to count the characters myself?</p>
  
  <p>Or, more general, how do I get the right byte size of a TCHAR string?</p>
  
  <p>Solution:</p>
  
  <pre><code>_tcslen(_T("TCHAR string")) * sizeof(TCHAR)
  </code></pre>
  
  <p>EDIT:<br>
  I was talking about null-terminated strings only.</p>