public int strcmp(string str1, string str2)
{
if (str1.Length > str2.Length) return -1;
if (str1.Length < str2.Length) return +1;
int len = str1.Length;
for (int n = 0; n < len; n++)
{
int dif = (int)str1[n] - (int)str2[n];
if (dif != 0) return dif;
}
return 0;
}