Logo

Programming-Idioms

History of Idiom 175 > diff from v5 to v6

Edit summary for version 6 by steenslag:
New Ruby implementation by user [steenslag]

Version 5

2018-12-30, 12:36:19

Version 6

2019-01-05, 23:52:11

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
Code
a.unpack("H*")
Demo URL
http://codepad.org/aTBnKYw6