mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Comment cites the string hash algorithm (djb2)
"If you just want to have a good hash function, and cannot wait, djb2 is one of the best string hash functions I know."
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
#include "extern/utf8decoder.h"
|
||||
|
||||
/*
|
||||
* Calculate the hash value for a string
|
||||
* Calculate the hash value for a string.
|
||||
* Uses the djb2 algorithm (xor version).
|
||||
* http://www.cse.yorku.ca/~oz/hash.html
|
||||
*/
|
||||
uint32_t calchash(const char *s)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user