title: Rotate a string in c++?
body: <p>I'm looking for a way to rotate a string in c++. I spend all of my time in python, so my c++ is <em>very</em> rusty.</p>
  
  <p>Here is what I want it to do: if I have a string 'abcde' I want it changed to 'bcdea' (first character moved to the end).
  Here is how I did it in python:</p>
  
  <pre><code>def rotate(s):
      return s[1:] + s[:1]
  </code></pre>
  
  <p>I'm not sure how to do it in cpp. Maybe use an array of chars? </p>