title: C++ `assign()` equivalent in C
body: <p>Any idea on how can I implement in C the C++ <code>assign()</code>?</p>
  
  <p>C++ code sample:</p>
  
  <pre><code>std::string ds;
  // snip //
  ds.assign((const char *)start, end - start);
  </code></pre>
  
  <p>using the same syntax in C I get the following error while compiling:</p>
  
  <p><code>error: request for member 'assign' in something not a structure or union</code></p>