title: Finding how similar two strings are
body: <p>I'm looking for an algorithm that takes 2 strings and will give me back a "factor of similarity".</p>
  
  <p>Basically, I will have an input that may be misspelled, have letters transposed, etc, and I have to find the closest match(es) in a list of possible values that I have.</p>
  
  <p>This is not for searching in a database. I'll have an in-memory list of 500 or so strings to match against, all under 30 chars, so it can be relatively slow.</p>
  
  <p>I know this exists, i've seen it before, but I can't remember its name.</p>
  
  <hr>
  
  <p>Edit: Thanks for pointing out Levenshtein and Hamming.
  Now, which one should I implement? They basically measure different things, both of which can be used for what I want, but I'm not sure which one is more appropriate.</p>
  
  <p>I've read up on the algorithms, Hamming seems obviously faster. Since neither will detect two characters being transposed (ie. Jordan and Jodran), which I believe will be a common mistake, which will be more accurate for what I want?
  Can someone tell me a bit about the trade-offs?</p>