title: std::string and UTF-8 encoded unicode
body: <p>If I understand well, it is possible to use both string and wstring to store UTF-8 text.</p>
  
  <ul>
  <li><p>With char, ASCII characters take a single byte, some chinese characters take 3 or 4, etc. Which means that <code>str[3]</code> doesn't necessarily point to the 4th character.</p></li>
  <li><p>With <code>wchar_t</code> same thing, but the minimal amount of bytes used per characters is always 2 (instead of 1 for <code>char</code>), and a 3 or 4 byte wide character will take 2 <code>wchar_t</code>.</p></li>
  </ul>
  
  <p>Right ?</p>
  
  <p>So, what if I want to use <code>string::find_first_of()</code> or <code>string::compare()</code>, etc with such a weirdly encoded string ? Will it work ? Does the string class handle the fact that characters have a variable size ? Or should I only use them as dummy feature-less byte arrays, in which case I'd rather go for a <code>wchar_t[]</code> buffer.</p>
  
  <p>If <code>std::string</code> doesn't handle that, second question: are there libraries providing string classes that could handle that UTF-8 encoding so that <code>str[3]</code> actually points to the 3rd character (which would be a byte array from length 1 to 4) ?</p>