MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / utf8FromCodepoint

Function utf8FromCodepoint

ESP32_AP-Flasher/src/contentmanager.cpp:831–844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831String utf8FromCodepoint(uint16_t cp) {
832 char buf[4] = {0};
833 if (cp < 0x80) {
834 buf[0] = cp;
835 } else if (cp < 0x800) {
836 buf[0] = 0xC0 | (cp >> 6);
837 buf[1] = 0x80 | (cp & 0x3F);
838 } else {
839 buf[0] = 0xE0 | ((cp >> 12) & 0x0F);
840 buf[1] = 0x80 | ((cp >> 6) & 0x3F);
841 buf[2] = 0x80 | (cp & 0x3F);
842 }
843 return String(buf);
844}
845
846String formatUtcToLocal(const String &s) {
847 int h, m, ss = 0;

Callers 1

drawDateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected