hash_string function

Hash a string to an integer