Domanda di colloquio di Lendlord

Some string manipulation question. Nothing too complicated.