PDA

View Full Version : convert string to byte values



steg90
22nd November 2007, 13:57
Hi,

If I have a QString with the following inside it :

"CC13FF87A4EE76BA"

I want to extract as :

CC
13
FF
87
A4
EE
76
BA

Then convert each one to its byte value, thus ascii "CC" would be (byte) 0xCC, etc...Is there a fast way of doing this?

Regards,
Steve

ChristianEhrlicher
22nd November 2007, 14:06
Yes it is.
Please first take a look into the Documentation of QString (http://doc.trolltech.com/4.3/qstring.html)!