MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / unicode_cpt_flags_from_utf8

Function unicode_cpt_flags_from_utf8

smallthinker/src/unicode.cpp:639–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639unicode_cpt_flags unicode_cpt_flags_from_utf8(const std::string & utf8) {
640 static const unicode_cpt_flags undef(unicode_cpt_flags::UNDEFINED);
641 if (utf8.empty()) {
642 return undef; // undefined
643 }
644 size_t offset = 0;
645 return unicode_cpt_flags_from_cpt(unicode_cpt_from_utf8(utf8, offset));
646}
647
648std::string unicode_byte_to_utf8(uint8_t byte) {
649 static std::unordered_map<uint8_t, std::string> map = unicode_byte_to_utf8_map();

Callers

nothing calls this directly

Calls 3

unicode_cpt_from_utf8Function · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected