On Friday, 24 April 2015 at 18:14:07 UTC, nrgyzer wrote:
Hi,I'm looking for a function that converts my hex-string to a binary representation. In Python I write the following:myHex = "123456789ABCDEF" myBin = myHex.decode('hex') But how to do the same in D? Is there any function? Thanks for suggestions!
import std.stdio; void main(){ import std.conv; import std.format; auto i = to!ulong("123456789ABCDEF", 16); writeln(format("%b", i)); }