HedgeServ interview question

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