That's not too useful because as it is strCom() does not exist.
I basically handed you the entire everything except that, because there wasn't much you were doing right. I am assuming strstr was the comparison function you could maybe figure out how to adapt to that code, because I have never used it before.
Ok looking at strstr, it doesn't seem very useful at all. I might write you up some version of the strcom() thing if I have time.
Edit: this might work
function strcom(%sa, %sb)
{
if(%sa $= %sb)
return 1;
if(%sa $= "" || %sb $= "")
return 0;
if(strlen(%sb) > strlen(%sa))
{
%temp = %sa;
%sa = %sb;
%sb = %temp;
}
if(strpos(%sa, %sb) > -1)
{
%leftovers = strlen(%sa) - strlen(%sb);
%acc = 1 - strlen(%sa)/%leftovers;
return %acc;
}
return 0;
}