Converts a string of hexadecimal digits to the corresponding binary value.
function HexToBin(Text: PChar; Buffer: PChar; BufSize: Integer): Integer;
int HexToBin(const char * Text, const char * Buffer, int BufSize);
Classes
Call HexToBin to convert the hexadecimal string Text to the binary value it represents.
Text is a string representation of a hexadecimal value.
Buffer returns the resulting value in binary.
BufSize is the size of Buffer. Text needs to point to at least 2*BufSize hexadecimal characters, because each two hexadecimal characters represent one byte.
HexToBin returns the number of characters in Buffer that have not been used because Text did not contain valid hexadecimal characters ('0'..'f').
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|