rotate string
remove duplicates from string