bool rotateString(char * A, char * B){ if (strlen(A) != strlen(B)) return false; char* s = (char*)calloc(strlen(A)*2+1,sizeof(char)); strcat(strcat(s,A),A); return strstr(s,B); }