Extracted from Pike v7.4 release 341 at 2005-11-30.
pike.ida.liu.se
[Top]
predef::

Method hash()


Method hash

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

Description

This function will return an int derived from the string s . The same string will always hash to the same value. If max is given, the result will be >= 0 and < max , otherwise the result will be >= 0 and <= 0x7fffffff.

Note

The hash algorithm was changed in Pike 7.1. If you want a hash that is compatible with Pike 7.0 and earlier, use hash_7_0() .

See also

hash_7_0()