I am working on a function to allow searching people in the same city.
Since I am not looking forward into using geolocation, I have user input their city. So, in order to have people find each other they need to input the same city name.
Now, I am using a case-sensitive database so the strings need to match, so I was thinking to have a simplification procedure, like this:
- user inputs city "New York"
->new york
->newyork
What I am looking forward to do next, is to make sure that people who input "new yprk" as a typo mistake, still be able to find each other.
I do not want to reinvent the wheel so, is there a script out there that you know about that sort of "hashes" the words so that slightly different words count as the same?
Thanks in advance.