| Thread overview | |||||
|---|---|---|---|---|---|
|
April 13, 2016 byte[] to hex string | ||||
|---|---|---|---|---|
| ||||
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. | ||||
April 13, 2016 Re: byte[] to hex string | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Suliman | 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(); | |||
April 13, 2016 Re: byte[] to hex string | ||||
|---|---|---|---|---|
| ||||
Posted in reply to WebFreak001 | On Wednesday, 13 April 2016 at 14:22:39 UTC, WebFreak001 wrote:
> 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();
Oh, thanks! It's really cool! I expect much more code!
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply