MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / HashString

Function HashString

Source/Utility/Translate.cpp:55–63  ·  view source on GitHub ↗

Hash was taken from http://stackoverflow.com/questions/98153/whats-the-best-hashing-algorithm-to-use-on-a-stl-string-when-using-hash-map

Source from the content-addressed store, hash-verified

53//
54//*****************************************************************************
55u32 HashString(const char* s)
56{
57 u32 hash = 0;
58 while (*s)
59 {
60 hash = hash * 101 + *s++;
61 }
62 return hash;
63}
64
65//*****************************************************************************
66//

Callers 2

Translate_StringsFunction · 0.85
Translate_DumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected