Re: string to hex convert

2018-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/29/2018 02:23 PM, Cym13 wrote: On Thursday, 29 March 2018 at 20:29:39 UTC, aerto wrote: how i can convert Hello world! to hex 48656c6c6f20776f726c6421 ?? Maybe something like: void main() {     // Those look like lots of imports but most of those are very common anyway     import st

Re: string to hex convert

2018-03-29 Thread Seb via Digitalmars-d-learn
On Thursday, 29 March 2018 at 20:29:39 UTC, aerto wrote: how i can convert Hello world! to hex 48656c6c6f20776f726c6421 ?? --- import std.format, std.stdio; void main() { writeln("Hello World!".format!("%(%02X%)")); } --- https://run.dlang.io/is/acz7kV

Re: string to hex convert

2018-03-29 Thread Cym13 via Digitalmars-d-learn
On Thursday, 29 March 2018 at 20:29:39 UTC, aerto wrote: how i can convert Hello world! to hex 48656c6c6f20776f726c6421 ?? Maybe something like: void main() { // Those look like lots of imports but most of those are very common anyway import std.digest: toHexString; import std.st

string to hex convert

2018-03-29 Thread aerto via Digitalmars-d-learn
how i can convert Hello world! to hex 48656c6c6f20776f726c6421 ??