When in an action for the recovery of money, the defendant alleges in his answer, that, before the commencement of the action, he tendered to the plaintiff the full amount to which he is entitled, in such money as by agreement ought to be tendered, and thereupon brings into court, for the plaintiff, the amount tendered, and the allegation be found true, the plaintiff shall not recover costs, but shall pay them to the defendant.
[Code 1881 § 516; 1877 p 109 § 520; 1854 p 203 § 378; RRS § 485.]