I'm looking for a function (built-in or user) that will spit back the amount of characters as an integer that are different between 2 strings. It must be position and length sensitive, meaning that if there is an "E" at position 2 in string one, and an "E" at position 4 in string two, that is considered different. If either string is longer than the other, then the longer of the 2 strings must consider the "extra" characters as mismatches. It should be case insensitive. This function has to be extremely quick as it's going to be called about 2500 times in a single operation I have.
The output should be as follows (assuming the function name is strDiff):
strDiff("resonate","resonate") 'returns 0 - exact match
strDiff("hello","hi") 'returns 4 - only the first h is a match, the "ello" has 4 characters that are not matched
strDiff("blue","yellow") 'returns 6 - yellow has 6 characters and blue does not have any in the same position
strDiff("horse","pony") 'returns 4 - only the second O is a match
strDiff("james","jimmy") 'returns 3 - the first J and third M characters are matches, 3 characters are not matched
strDiff("swinging","swing") 'returns 3 - "ing" has no match