FastLED 3.10.9
Loading...
Searching...
No Matches

◆ append_utf8()

void fl::anonymous_namespace{json.cpp.hpp}::append_utf8 ( fl::string & out,
unsigned long cp )

Definition at line 657 of file json.cpp.hpp.

657 {
658 if (cp < 0x80) {
659 out += static_cast<char>(cp);
660 } else if (cp < 0x800) {
661 out += static_cast<char>(0xC0 | (cp >> 6));
662 out += static_cast<char>(0x80 | (cp & 0x3F));
663 } else if (cp < 0x10000) {
664 out += static_cast<char>(0xE0 | (cp >> 12));
665 out += static_cast<char>(0x80 | ((cp >> 6) & 0x3F));
666 out += static_cast<char>(0x80 | (cp & 0x3F));
667 } else {
668 out += static_cast<char>(0xF0 | (cp >> 18));
669 out += static_cast<char>(0x80 | ((cp >> 12) & 0x3F));
670 out += static_cast<char>(0x80 | ((cp >> 6) & 0x3F));
671 out += static_cast<char>(0x80 | (cp & 0x3F));
672 }
673}

References append_utf8(), and fl::FL_NO_EXCEPT.

Referenced by append_utf8(), and unescape_string().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: