Question d’entretien chez Bjak

Was asked a string manipulation problem,