I'm looking for a function that would compare 2 strings, but treat 'similar' letters as equals. So:
myFunction(cake, ćäke); // returns true
// but
myFunction(cake, ćäek); // returns false
I was thinking of making such a function myself, and my idea was to make it check the strings letter by letter, and for each letter it would have an array of 'similar' ones, and if 2 letters are in the same array, they are treated as the same.
But, is there a simpler way? Does JavaScript (or jQuery) have something like that built in? Or, am I being silly and is my algorithm inferior to another one? If so, could someone point me in the right direction?