Untitled
public text v1 · immutableint str_cmp(str_t *str1,str_t *str2)
{
int cnt;
int res;
char c1;
char c2;
for (cnt=0;str_length(str1)>cnt;cnt++)
{
c1=str_data(str1)[cnt];
c2=str_data(str2)[cnt];
if ((res=c1-c2)!=0)
return res;
}
return res;
}