Logo

Programming-Idioms

History of Idiom 142 > diff from v5 to v6

Edit summary for version 6 by BBaz:
[D] gzgtzregretg

Version 5

2016-08-14, 20:02:50

Version 6

2016-08-14, 20:03:27

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
std.conv;
Imports
import std.conv;
Code
s = to!string(x, 16);
Code
s = to!string(x, 16);
Comments bubble
std.conv.to is the entry point for any standard convertion.
Comments bubble
std.conv.to is the entry point for any standard convertion.
Doc URL
https://dlang.org/phobos/std_conv.html#.to
Doc URL
https://dlang.org/phobos/std_conv.html#.to