Infosys interview question

they asked a string manipulation question