【leetcode】左旋转字符串
char* reverseLeftWords(char* s, int n){
if (n == 0)
return s;
int len = strlen(s);
char* str = (char*)calloc(len+1,sizeof(char));//多一个字节后面放'\0'结束
n %= len;
int i = 0;
for (i = n; i<len+n; i++)
{
str[i-n] = s[i%len];
}
return str;
}