Pregunta de entrevista de Thoughtworks

i was asked string manipulation