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
Hey, calm down. There is no need to brag like you do!
Use something along this line:
#include <String.au3>
Local Const $numeros[20] = [ _
"one", _
"two", _
"three", _
"four", _
"five", _
"six", _
"seven", _
"eight", _
"nine", _
"ten", _
"eleven", _
"twelve", _
"thirteen", _
"fourteen", _
"fifteen", _
"sixteen", _
"seventeen", _
"eighteen", _
"nineteen", _
"twenty" _
]
Local $test_word = "thraa"
Local $bestMatch = StringLen($test_word), $bestMatchIdx, $typos
For $