Keeper Security Interview Question

I was asked a string manipulation question.