let fold_lefti f init s = String.foldi s ~init ~f:(fun i a c -> f a i c)