title: Hash function that can return a integer range based on string
body: <p>I am looking to create a simple c++ hash function which will return a number within a max range based on a string input.  So that, the same string will always return the same integer value.  Here is an arbitrary example where the max desired range is 36.</p>
  
  <pre><code>Fred Smith -&gt; 25
  tree -&gt; 34
  Frog -&gt; 0
  Fred Smith -&gt; 25
  fred smith -&gt; 7
  </code></pre>
  
  <p>These numbers are arbitrary, but the function should use an algorithm that does a numeric calculation against the string and results in an integer within a defined range.  I will eventually rewrite this function for use in Python 2.7 as well.</p>
  
  <p>I am using vs2008 (aka c++9) and std::hash is not available.</p>
  
  <p>I need some advice on the approach.</p>