0796.cpp (179B)
1 class Solution { 2 public: 3 bool rotateString(const string &s, const string &goal) const { 4 return size(s) == size(goal) && (s + s).find(goal) != string::npos; 5 } 6 };