let to_native_string_knowing_size
~future_size ~iter ~write_char_to_native_string l =
let length = future_size l in
let buf = String.make length 'B' in
let index = ref 0 in
iter l ~f:begin fun c ->
match write_char_to_native_string c ~buf ~index:!index with
| `Ok siz -> index := !index + siz
| `Error `out_of_bounds ->
failwith "Bug in Make_native_conversions.to_native_string"
end;
buf