Explicit string behavior in non-constructor member functions
<p>I hope I've titled my question correctly.</p>

<p>I have a very large/old database with many non-null terminated char arrays and a few std::string types. I'm creating a tool that will use this database, and I'd like to ensure it's safety with respect to the non-null terminated char arrays. Ideally I'd like to support both types to make it easy for the developer to use the tool.</p>

<pre><code>void AddCell( const std::string &amp; _cell_str );
void AddCell( const char * _cell_data, size_t _array_size );
</code></pre>

<p>However, there's a specific scenario that could be problematic: if a new developer is unaware that the char array is non-null terminated and out of laziness decides to use the implicit conversion of the std::string because he doesn't have to enter the array size, then it's possible that the std::string will show some unwanted chars.</p>

<p>How can I deal with this problem? Should I force someone to specify the length of the std::string? Should I just remove the std::string overloaded function and make everyone use c_str() from their std::string? Ideally, I'd just use the explicit keyword, but it's only available for constructors. I'm hesitant to steer away from the use of std::string.</p>
