69,371
社区成员
发帖
与我相关
我的任务
分享
unsigned int get_stringcode(char *string)
{
unsigned int c, code;
int i;
code = 0;
for( i=0; (c = (unsigned char) string[i]) != 0; i++ )
{
if( isupper(c) )
{
c = tolower(c);
}
code = code + c;
}
code = (code & 0xFF) + (strlen(string) << 8);
return(code);
}