initial solution for rotation? method - without call to String#index
adding a trick to the puzzle, can now call String#index only once