Logo

Programming-Idioms

History of Idiom 175 > diff from v3 to v4

Edit summary for version 4 by Bart:
New Pascal implementation by user [Bart]

Version 3

2018-12-16, 13:56:47

Version 4

2018-12-28, 22:08:27

Idiom #175 Bytes to hex string

From array a of n bytes, build the equivalent hex string s of 2n digits.
Each byte (256 possible values) is encoded as two hexadecimal characters (16 possible values per digit).

Idiom #175 Bytes to hex string

From array a of n bytes, build the equivalent hex string s of 2n digits.
Each byte (256 possible values) is encoded as two hexadecimal characters (16 possible values per digit).

Extra Keywords
hexa
Extra Keywords
hexa
Imports
sysutils
Code
begin
  s := '';
  for b in a do s := s + IntToHex(b,2);
end.