Thoughtworks interview question

i was asked string manipulation