Saks OFF 5TH interview question

Write a code to manipulate a given string