StrOps::XtoO( char *, unsigned char *, int )
Convert a hex string into an octet stream.
Virtual? |
No |
|
Class |
||
Arguments |
|
the input hex string |
|
the output stream |
|
|
the length of the output, in bytes |
|
Returns |
|
Notes
This function converts the input hexadecimal string into the stream of bytes that it represents.
Example
char *hex = "666F6F";
unsigned char oct[4];
StrOps::XtoO( hex, oct, 3 );
oct[3] = '\0';
printf( "%s", oct );
return 0;
Executing the preceding code produces the following output:
% a.out foo