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

Function swkbdConvertToUTF16

libctru/source/applets/swkbd.c:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53static void swkbdConvertToUTF16(u16* out, const char* in, int max)
54{
55 if (!in || !*in)
56 {
57 out[0] = 0;
58 return;
59 }
60
61 ssize_t units = utf8_to_utf16(out, (const uint8_t*)in, max);
62 if (units < 0)
63 {
64 out[0] = 0;
65 return;
66 }
67
68 out[units] = 0;
69}
70
71static const u16 swkbdFeatures[] =
72{

Callers 5

swkbdSetHintTextFunction · 0.85
swkbdSetButtonFunction · 0.85
swkbdSetDictWordFunction · 0.85
swkbdMessageCallbackFunction · 0.85
swkbdInputTextFunction · 0.85

Calls 1

utf8_to_utf16Function · 0.85

Tested by

no test coverage detected