/*
* fn: 把0x开头的十六进制字符串转发成数字;
* input: 比如 0xFAB00255;
* return: 转换后的int 值;
*/
unsigned int GetUintFromHexStr( char *input )
{
unsigned int result = 0;
char *ptr;
ptr = strstr( input, "0x" );
if( NULL != ptr )
{
ptr += 2;
sscanf( ptr, "%X", &result );
}
else
{
result = Atoi( input );
}
return result;
}