Logo

Programming-Idioms

History of Idiom 142 > diff from v4 to v5

Edit summary for version 5 by BBaz:
New D implementation by user [BBaz]

Version 4

2016-08-14, 20:00:25

Version 5

2016-08-14, 20:02:50

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
Extra Keywords
hex hexa
Imports
import std.format;
Code
s = format("%x", x);
Doc URL
https://dlang.org/phobos/std_format.html#.format