Keeper Security interview question

I was asked a string manipulation question.