Pike v8.0 release 1738

Method hash()


Method hash

int hash(string s)
int hash(string s, int max)

Description

Return an integer derived from the string s. The same string will always hash to the same value, also between processes.

If max is given, the result will be >= 0 and < max, otherwise the result will be >= 0 and <= 0x7fffffff.

Note

This function is provided for backward compatibility reasons.

This function is byte-order dependant for wide strings.

See also

hash(), 7.0::hash()