check if s1 is a rotation of s2 using one call of isSubstring