public long str16HexToDigit(String str16Hex){
int len = str16Hex.length();
long sum = 0;
for(int i=0;i<len;i++){
char c = (char)str16Hex.charAt(len-1-i); 微笑
int n = Character.digit(c, 16);
sum += n*(1<<(4*i));
}
return sum;
}
网友评论