Couldn't resist... I have no idea how close in concept this is though. MsgBox(0, '', 'Case Sensitive: ' & _StringLikePerc('I am a strinG.', 'I am a string.', 1) & '%' & @CR & _
'Not Sensitive: ' & _StringLikePerc('I am a strinG.', 'I am a string.') & '%')
Func _StringLikePerc($sString1, $sString2, $nCase = 0)
Local $nLen1 = StringLen($sString1), $nLen2 = StringLen($sString2)
Local $nMinLen = $nLen1, $nMaxLen = $nLen2, $iAdd
If $nLen2 < $nLen1 Then
$nMinLen = $nLen2
$nMaxLen = $nLen1
EndIf
If $nCase Then
For $iCC = 1 To $nMinLen
If StringMid($sString1, $iCC, 1) == StringMid($sString2, $iCC, 1) Then $iAdd += 1
Next
Else
For $iCC = 1 To $nMinLen
If StringMid($sString1, $iCC, 1) = StringMid($sString2, $iCC, 1) Then $iAdd += 1
Next
EndIf
Return Round(($iAdd / $nMaxLen) * 100, 2)
EndFunc
Edit:
Now that I think about it, the above isn't a good example, it would only do a % based on if the first char was the same or not... if that varied, then it would return a 0% match.... ahh well.