左旋一个字符串和手摇反转法
void leftRoutate(std::string& s, size_t offset)
{
auto reverse = [&](size_t begin, size_t end)
{
--end;
while (begin <= end){
std::swap(s[begin], s[end]);
++begin;
--end;
}
};
reverse(0, offset);
reverse(offset, s.length ());
reverse(0, s.length ());
}