Implemented exercise 1.8 - Check if a string is a rotation of another string.