https://stackoverflow.com/a/11958496/379650 provides a very good function for calculating the Damerau–Levenshtein distance, however, I would like to be able to find the index of each of the differences given in terms of either the first or second string.
I am open to some other method better than Damerau–Levenshtein distance (if there is one), but it seemed like the most logical choice.
Example:
//Indices given in terms of the first string
ld('abc','abc');//[] no mistakes
ld('abc','abd');//[2]
ld('abc','aad');//[1,2]
ld('abc','ac');//[1]