Any associate circuit judge who shall commit any person charged with an offense to jail, or by whom any vagrant or disorderly person shall be committed, shall cause such person to be searched, for the purpose of discovering any money or property he may have, and if any be found, the same shall be taken into possession by the sheriff, and applied to the support of such person while in confinement, and to the payment of any costs which may be adjudged against him on account of the offense for which he is charged.
§ 542.300, RSMo