
unsigned int SL_GetCanonicalString(const char *str)
{
unsigned int result;
if (str)
{
unsigned int hash = (tolower(*str) ^ 0x319712C3) * 0xB3CB2E29;
for (int i = 1; i <= strlen(str); i++)
hash = (tolower(str[i]) ^ hash) * 0xB3CB2E29;
result = hash;
}
else
{
result = 0;
}
return result;
}