C++ 代码
class Solution {
public:
string leftRotateString(string str, int n) {
string temp = str + str;
string res;
int len = str.size();
for (int i = n; i < len + n; i ++)
res += temp[i];
return res;
}
};