How to convert a const char * to std::string
<p>What is the correct/best/simplest way to convert a c-style string to a std::string.</p>

<p>The conversion should accept a max_length, and terminate the string at the first \0 char, if this occur before max_length charter.</p>
