Logo

Programming-Idioms

History of Idiom 142 > diff from v12 to v13

Edit summary for version 13 by programming-idioms.org:
[Lua] No need for sample values

Version 12

2017-08-21, 13:30:46

Version 13

2017-08-21, 19:44:58

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)
Code
s = string.format("%x",x)