[求助]谁能看懂这个函数?
htoi(char s[]){int i,n;
for (i=0;s[i]!='\0';i++)
{if (s[i]>='0'&&s[i]<='9')
n=n*16+s[i]-'0';
if (s[i]>='a'&&s[i]<='f')
n=n*16+s[i]-'a'+10;
if (s[i]>='A'&&s[i]<='F')
n=n*16+s[i]-'a'+10;
}
return(n);
}