title: Convert a non-null terminated vector<char> to string
body: <p>I have a non-null terminated vector of chars, how can I construct a new string and have it automatically insert <code>\0</code> to the end of string?</p>
  
  <pre><code>std::vector&lt;char&gt; v;
  v.push_back('H');
  v.push_back('i');
  v.push_back('!');
  //v.push_back('\0'); &lt;~ without using this line
  
  std::string a(v.data());
  std::string b(v.begin(), v.end()); // same meaning as b(v.data(), v.size())
  </code></pre>
  
  <p>What is the correct constructor between the two?</p>