| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]
7.4::

# 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()