HashString(string)
From NWN Lexicon
Jump to navigationJump to searchReturns the 32bit integer hash of sString.
Parameters
- sString
- The string from which the hash is calculated.
Description
Returns the 32bit integer hash of sString. This hash is stable and will always have the same value for same input string, regardless of platform.
The hash algorithm is the same as the one used internally for strings in case statements, so you can do:
NOTE: The exact algorithm used is XXH32(sString) ^ XXH32(""). This means that HashString("") is 0.
Remarks
Version
This function was added in 1.87.8193.35 of NWN:EE.
Example
See Also
author: Shadguy