左旋转字符串
class Solution {
public String leftRotateString(String str,int n) {
if (n == 0)
return str;
int len = str.length();
StringBuilder sb = new StringBuilder();
for (int i = n; i < len; i++) {
sb.append(str.charAt(i));
}
for (int i = 0; i < n; i++) {
sb.append(str.charAt(i));
}
return sb.toString();
}
}