Logo

Programming-Idioms

History of Idiom 142 > diff from v11 to v12

Edit summary for version 12 by Bug38:
New Lua implementation by user [Bug38]

Version 11

2017-06-07, 13:55:34

Version 12

2017-08-21, 13:30:46

Idiom #142 Hexadecimal digits of an integer

Assign to string s the hexadecimal representation (base 16) of integer x.

E.g. 999 -> "3e7"

Idiom #142 Hexadecimal digits of an integer

Assign to string s the hexadecimal representation (base 16) of integer x.

E.g. 999 -> "3e7"

Extra Keywords
hex hexa radix
Extra Keywords
hex hexa radix
Code
local x = 999
s = string.format("%x",x)