title: Similar to hash values but something that returns an int
body: <p>Using the hash function MD5 on a string creates a very long value, and it creates the same value for the same string every time. Now, my question is: is there a way to do something similar, like give it a string and it returns the same integer every time, and also the integers that it returns for different string are inside a specific interval. What i mean is something like <a href="http://upload.wikimedia.org/wikipedia/commons/5/58/Hash_table_4_1_1_0_0_1_0_LL.svg" rel="nofollow">this</a>. </p>
  
  <p>Ex: Give it "Mary had a little lamb." and it returns the value 10. Give the same string, it returns 10 again.</p>
  
  <p>Please do ask, in case i wasn't entirely clear.</p>