-module(string_width_ffi). -export([ fold_codepoints/3, utf_codepoint_to_string/1 ]). fold_codepoints(Binary, State, Fun) -> case Binary of <> -> fold_codepoints(Rest, Fun(State, Cp), Fun); _ -> State end. utf_codepoint_to_string(Cp) -> <>.