|
-
April 14th, 1999, 10:58 AM
#1
Hex conversion
I need to convert string "A1A2A3A4" to "\xA1\xA2\xA3\xA4"
and "\xA1\xA2\xA3\xA4" to "A1A2A3A4".
I can do this by splitting string "A1A2A3A4" on "A1" "A2" "A3" "A4"
and then passing to strtol("0xA1", &stopstring, 16);
The result added to string. Is it possible to do this using sscanf and sprintf.
Thank you for any better idea.
Maria F. Kornievskaya
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|