help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

HexToBin

Convert a hexadecimal string to a binary buffer

Declaration

Source position: classesh.inc line 1694

function HexToBin(

  HexValue: PChar;

  BinValue: PChar;

  BinBufSize: Integer

):Integer;

Description

HexToBin scans the hexadecimal string representation in HexValue and transforms every 2 character hexadecimal number to a byte and stores it in BinValue. The buffer size is the size of the binary buffer. Scanning will stop if the size of the binary buffer is reached or when an invalid character is encountered. The return value is the number of stored bytes.

Errors

No length checking is done, so if an invalid size is specified, an exception may follow.

See also

BinToHex

  

Convert a binary buffer to a hexadecimal string

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505