public void AddInputCharactersUTF8(string utf8_chars) { int utf8_chars_byteCount = (utf8_chars != null) ? Encoding.UTF8.GetByteCount(utf8_chars) : 0; byte *native_utf8_chars = stackalloc byte[utf8_chars_byteCount + 1]; fixed(char *utf8_chars_ptr = utf8_chars) { int native_utf8_chars_offset = (utf8_chars != null) ? Encoding.UTF8.GetBytes(utf8_chars_ptr, utf8_chars.Length, native_utf8_chars, utf8_chars_byteCount) : 0; native_utf8_chars[native_utf8_chars_offset] = 0; } native_utf8_chars = (utf8_chars != null) ? native_utf8_chars : null; ImGuiNative.ImGuiIO_AddInputCharactersUTF8(NativePtr, native_utf8_chars); }
public static unsafe void AddInputCharactersUTF8(byte *utf8_chars) { ImGuiNative.ImGuiIO_AddInputCharactersUTF8(utf8_chars); }
public static void AddInputCharactersUTF8(string utf8_chars) { ImGuiNative.ImGuiIO_AddInputCharactersUTF8(utf8_chars); }