Replace a few characters in a string literal using C++
<p>i have </p>

<pre><code>cost char* a="test_r.txt"
</code></pre>

<p>i want to strip the _r and add _n instead of it so that it becomes "test_n.txt" 
 and save it in const char* b;</p>

<p>what is the easiest way to do it ?</p>
