i have a main-string and other sub-strings,find the sub-string which is like the main-string most. i don't know how to do it
example: main-string: aqwert
sub-strings:
+qwerb
+gfdgf
+qwbt
result:
+qwerb : 80% ( have same qwer)
+gfdgf: 0% ( nothing like)
+qwbt: 20% ( have same qw)
pls help me, thx
That's correct.
If typos($str1, $str2) = 0 Then MsgBox(0, $str1 & ' and ' & $str2 & ' are identical (case-sensitive wise).')
; Computes the number of typos (Damerau-Levenshtein distance) between two strings.
; Four types of differences are counted:
; insertion of a character, abcd ab#cd
; deletion of a character, abcd acd
; exchange of a character abcd ab$d
; inversion of adjacent chars abcd acbd
;
; This function does NOT satisfy the so-called "triangle inequal