Question d’entretien chez HedgeServ

given the string ("1 + 2") write a function that solves it.