Parsing a C++ string in C++
<p>I have a requirement like this: I have a string like "-myArg:ArgVal".</p>

<pre><code>std::string strArg = "-myArg:ArgVal";
</code></pre>

<p>Now, I have to check in above string first character is always '-' and if first character is '-' i should remove it and i should store "myArg" and "ArgVal" in two different string objects.</p>

<p>How can I do this efficiently?</p>
