Method to check if string2 is obtained by string 1
public static bool isRotated ( string str1 , string str2 ) { if ( str1 . Length != str2 . Length ) { return false ; } if ( str1 . Length < 2 ) { return str1 . Equals ( str2 ) ; } string clock_rot = " " ; string anticlock_rot = " " ; int len = str2 . Length ;