Qt QString lastIndexOf not working
<p>I'm using Qt5.6, I'm trying to use the QString function lastIndexOf.  The subject data contains something like:</p>

<pre><code>    156 + (28 * 4) + (14 * 9 * 2)
</code></pre>

<p>Using indexOf:</p>

<pre><code>    int intOpB = strLocalCopy.indexOf(ucOpenBracket);
</code></pre>

<p>strLocalCopy contains the subject data and ucOpenBracket contains '('.</p>

<p>intOpB is returned correctly and is 6.</p>

<p>I then look for the last occurence of ')':</p>

<pre><code>    int intClB = strLocalCopy.lastIndexOf(ucCloseBracket, (++intOpB));
</code></pre>

<p>Using intOpB as a reference, but lastIndexOf is always returning -1 to intClB, why?</p>

<p>I'm using the debugger to single step so I can verify that all variables contain what they should.</p>

<p>If I remove the 2nd parameter it works, but I don't understand why it doesn't work with the parameter supplied.</p>