Neatly convert string to number