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

Function codepoints_to_utf16

unicode.h:317–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317static std::vector<uint16_t> codepoints_to_utf16(const std::vector<uint32_t> & cps) {
318 std::vector<uint16_t> result;
319 for (size_t i = 0; i < cps.size(); ++i) {
320 auto temp = codepoint_to_utf16(cps[i]);
321 result.insert(result.end(), temp.begin(), temp.end());
322 }
323 return result;
324}
325
326static uint32_t codepoint_from_utf16(const std::vector<uint16_t> & utf16, size_t & offset) {
327 assert(offset < utf16.size());

Callers

nothing calls this directly

Calls 5

codepoint_to_utf16Function · 0.85
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected