<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><tt><font size="-1">function strlicomp(str1,str2 : pwidechar;l :
SizeInt) : SizeInt;<br>
var<br>
counter: sizeint;<br>
c1, c2: char;<br>
begin<br>
counter := 0;<br>
if l=0 then<br>
begin<br>
strlicomp := 0;<br>
exit;<br>
end;<br>
repeat<br>
c1:=simplewideupcase(str1[counter]);<br>
c2:=simplewideupcase(str2[counter]);<br>
if (c1=#0) or (c2=#0) then break;<br>
inc(counter);<br>
until (c1<>c2) or (counter>=l);<br>
strlicomp:=ord(c1)-ord(c2);<br>
end;<br>
<br>
</font></tt>suggestions:<br>
<br>
a)<br>
if (c1=#0) or (c2=#0) then break;<br>
-><br>
if c1=#0 then break;<br>
if c2=#0 then break;<br>
<br>
b)<br>
embed upcase to avoid CALL<br>
c1:=simplewideupcase(str1[counter]);<br>
c2:=simplewideupcase(str2[counter]);<br>
-><br>
c1:= str1[counter];<br>
c2:= str2[counter];<br>
if (c1>='a') and (c1<='z') then dec(c1, 32);<br>
if (c2>='a') and (c2<='z') then dec(c2, 32);<br>
<br>
c) not sure..<br>
we have 2 same diff's <br>
c1<>c2<br>
and<br>
ord(c1)-ord(c2)<br>
<br>
</p>
<pre class="moz-signature" cols="72">
Alexey Torgashin</pre>
</body>
</html>