MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / Utf8CharKey

Function Utf8CharKey

src/PrefixMatch.cpp:43–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43uint32_t Utf8CharKey(const char* str, size_t charLen) {
44 uint32_t key = static_cast<uint32_t>(charLen);
45 for (size_t i = 0; i < charLen; i++) {
46 key = (key << 8) | static_cast<unsigned char>(str[i]);
47 }
48 return key;
49}
50
51} // namespace
52

Callers 2

MatchPrefixCandidateMethod · 0.85
AddEntryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected