byte[] to hex string

WebFreak001 via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 13 07:22:39 PDT 2016


On Wednesday, 13 April 2016 at 14:15:21 UTC, Suliman wrote:
> Does anybody have any ready to use byte[] to hex convert  
> method?
> I found only C# examples
> http://stackoverflow.com/questions/623104/byte-to-hex-string
>
> Could anybody help me to convert any of this methods to D?
>
> The root of my problem is from here
> http://stackoverflow.com/questions/36600503/can-i-insert-in-db-binary-blob-data-in-body-of-sql-request-if-driver-do-not-supp
>
> I want to try mass hex string as SQL test to insert its in 
> FireBird blob.

https://dlang.org/phobos/std_digest_digest.html#toHexString

---

import std.digest.digest;

ubyte[] data;
string hexString = data.toHexString();


More information about the Digitalmars-d mailing list