The sheriff shall arrest and take before the nearest magistrate for examination all persons who attempt to commit or who have committed a public offense.
(Added by Stats. 1947, Ch. 424.)