Remove \r from a string in C++
<p>in a C++ program, there is a point when it reads a string like:</p>

<pre><code>"NONAME_1_1\r"
</code></pre>

<p>the <code>\r</code> is causing me trouble. I guess it prints or adds something like "^M". Is it right? Anyway it casues me problem, and I want to get rid of it.</p>

<p>I can not modify the input. I wonder how could I at this point, using C++, and in the easiest way, to remove <code>\r</code> for this string. </p>

<p>I know how to do it on bash but no clue on C++.</p>

<p>Thanks.</p>
