MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / unicode_tolower

Function unicode_tolower

src/unicode.cpp:1039–1049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1037}
1038
1039uint32_t unicode_tolower(uint32_t cpt) {
1040 // binary search
1041 auto it = std::lower_bound(unicode_map_lowercase.begin(), unicode_map_lowercase.end(), cpt,
1042 [](const std::pair<uint32_t, uint32_t> & pair, uint32_t value) {
1043 return pair.first < value;
1044 });
1045 if (it != unicode_map_lowercase.end() && it->first == cpt) {
1046 return it->second;
1047 }
1048 return cpt; // Return the original code point if no lowercase mapping is found
1049}
1050
1051bool unicode_cpt_is_han(uint32_t cpt) {
1052 // Han character ranges (Chinese/CJK characters)

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected