MCPcopy Create free account
hub / github.com/devkitPro/libctru / swkbdConvertToUTF8

Function swkbdConvertToUTF8

libctru/source/applets/swkbd.c:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35static void swkbdConvertToUTF8(char* out, const u16* in, int max)
36{
37 if (!in || !*in)
38 {
39 out[0] = 0;
40 return;
41 }
42
43 ssize_t units = utf16_to_utf8((uint8_t*)out, in, max);
44 if (units < 0)
45 {
46 out[0] = 0;
47 return;
48 }
49
50 out[units] = 0;
51}
52
53static void swkbdConvertToUTF16(u16* out, const char* in, int max)
54{

Callers 2

swkbdMessageCallbackFunction · 0.85
swkbdInputTextFunction · 0.85

Calls 1

utf16_to_utf8Function · 0.85

Tested by

no test coverage detected