Pregunta de entrevista de Keeper Security

I was asked a string manipulation question.