fuzzy search algorithm using my own variant of Damerau-Levenshtein distance it can break a little bit with shorter texts (or texts with only one substring) but the "correct" result is always close to the top, so i'm pretty happy with it ^^ "aaaaaaaaa" ends up at the top a lot since it's only one string, which can normally outweigh a closer match with more substrings due to how the algorithm divides text up internally i did need to reuse some variables, and there's more lists than i would like though...
code is pretty well commented, you should be able to figure out what it does thank you wikipedia for the rather unhelpful and overly technical explanation of DL distance text says silly stuff right now :p click see inside and change it if you want