lundi 1 décembre 2014

[iOS]How to convert char(or Byte) with hexadecimal data in it, to an integer(decimal value)

I have



char tem;


Its value is shown as blow:



Printing description of tem:
(char) tem = '\xd1'


which should equals to 209 in decimal.


My question is how can I implement this conversion programmatically? That is I want to get a NSInteger that equals 209 in this case.




Aucun commentaire:

Enregistrer un commentaire