The most basic approaches I know are Hamming distance and Edit Distance (aka Levenshtein Distance). There are other string metrics available, though:
http://en.wikipedia.org/wiki/String_metric
Edit distance is quite easy to implement efficiently using QtConcurrent or OpenCL..
Bookmarks