title: How do i peek at at the next value of string iterator
body: <p>In a loop running over the entire <code>string</code> how do i peek at the next value of iterator?</p>
  
  <pre><code>for (string::iterator it = inp.begin(); it!= inp.end(); ++it)
  {
    // Just peek at the next value of it, without actually incrementing the iterator
  }
  </code></pre>
  
  <p>This is quite simple in C,</p>
  
  <pre><code>for (i = 0; i &lt; strlen(str); ++i) {
       if (str[i] == str[i+1]) {
           // Processing
       }
  }
  </code></pre>
  
  <p>Any efficient way to do above in c++?</p>
  
  <p>Note: Im not using Boost.</p>