From anonymous, 1 Month ago, written in Python.
Embed
  1. import ctypes
  2.  
  3. def hashCode(s):
  4.     h = 0
  5.     for c in s:
  6.         h = (h << 5) - h + ord(c)
  7.     return ctypes.c_int32(h).value