| Extracted from Pike v7.8 release 866 at 2016-04-05.

[Top]
7.0::

# Method hash()

Method hash

  `int hash(string s, int|void f)`

Description

  Calculate a hash of a string (Pike 7.0 compatibility).

  This function is now available as hash_7_0() .

See also

  hash_7_0() , 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 always hashes 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 not NUL-safe, and is byte-order dependant.

See also

  hash() , 7.4::hash()