public any stringSimilarity([any s1], [any s2], [any maxOffset])
StringSimilarity
Brad Wood
brad@bradwood.com
May 2007
http://www.codersrevolution.com/blog/ColdFusion-Levenshtein-Distance-String-comparison-and-highlighting
Code adopted from Siderite Zackwehdex's Blog
http://siderite.blogspot.com/2007/04/super-fast-and-accurate-string-distance.html
Parameters:
s1: First string to be compared
s2: Second string to be compared
maxOffset: Average number of characters that s1 will deviate from s2 at any given point.
This is used to control how far ahead the function looks to try and find the
end of a piece of inserted text. Play with it to suit.
2016-50-20 James Moberg SunStarMedia.com
- Added VAR scope to 15 variables. (Increased performance from 15-32 to 0-15ms.)
- Added generateHTML flag (optional). If disabled, will return empty s1 & s2 strings.