MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / ComputeUtf16Hash

Function ComputeUtf16Hash

Bcore/src/main/cpp/dex/utf.h:80–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 */
79template<typename MemoryType>
80int32_t ComputeUtf16Hash(const MemoryType* chars, size_t char_count) {
81 uint32_t hash = 0;
82 while (char_count--) {
83 hash = hash * 31 + *chars++;
84 }
85 return static_cast<int32_t>(hash);
86}
87
88int32_t ComputeUtf16HashFromModifiedUtf8(const char* utf8, size_t utf16_length);
89

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected