I have few hex numbers that the last digit mean the length of the string after. for example
2E3F00004Sara
41590000AFavhilmnfr
Except from:
515900016Mickael Barrie Linwood
Which is 22 not 16..
any idea how to get it from the number? Thank you
First of all, 16
is right since 16
is hexadecimal representation for decimal 22
:
16 in hex = 1*16 + 6 = 22
You could convert an hex string to an int number with this in C#:
int namelength = Convert.ToInt32("0016", 16);
// namelength will be 22
namelength = Convert.ToInt32("000A", 16);
// namelength will be 10
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments