Microsoft interview question

String manipulation.