title: Replace specific characters in std::string with spaces
body: <p>Following code removed punctuation marks correctly from char array: </p>
  
  <pre><code>#include &lt;cctype&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
      char line[] = "ts='TOK_STORE_ID'; one,one, two;four$three two";
      for (char* c = line; *c; c++)
      {
          if (std::ispunct(*c))
          {
              *c = ' ';
          }
      }
      std::cout &lt;&lt; line &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>How would this code look if the <code>line</code> is of type <code>std::string</code>?</p>