Check for string rotation done (whitout the is_substring method)