Whenever any officer has to pay necessary expenses for board in guarding a prisoner, the expenses shall be allowed to the officer, to be taxed in the bill of costs not to exceed thirty-five cents (35¢) per meal each for the officer, the prisoner and the guard.