On Monday, 5 February 2018 at 10:04:10 UTC, Seb wrote:
On Monday, 5 February 2018 at 08:41:43 UTC, FrankLike wrote:
auto input = cast(string)hexString(hash);
Use toHexString to get the string:
Sorry,'hexString(hash)' is my clerical error.
Thank you.I got the answer "no array".
On Monday, 5 February 2018 at 09:45:11 UTC, tetyys wrote:
On Monday, 5 February 2018 at 08:41:43 UTC, FrankLike wrote:
Casting unknown bytes to string or char is unsafe, and
obviously some bytes can be invalid UTF8 sequences.
Thank you.I got my error.
On Monday, 5 February 2018 at 08:41:43 UTC, FrankLike wrote:
On Monday, 5 February 2018 at 06:12:22 UTC, H. S. Teoh wrote:
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via
auto input = "48656c6c6f20776f726c6421";
auto str = input.chunks(2)
.map!(digits
On Monday, 5 February 2018 at 08:41:43 UTC, FrankLike wrote:
On Monday, 5 February 2018 at 06:12:22 UTC, H. S. Teoh wrote:
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via
auto input = "48656c6c6f20776f726c6421";
auto str = input.chunks(2)
.map!(digits
On Monday, 5 February 2018 at 06:12:22 UTC, H. S. Teoh wrote:
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via
auto input = "48656c6c6f20776f726c6421";
auto str = input.chunks(2)
.map!(digits => cast(char) digits.to!ubyte(16))
On Monday, 5 February 2018 at 06:12:22 UTC, H. S. Teoh wrote:
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via
auto input = "48656c6c6f20776f726c6421";
auto str = input.chunks(2)
.map!(digits => cast(char) digits.to!ubyte(16))
On Monday, 5 February 2018 at 06:12:22 UTC, H. S. Teoh wrote:
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via
assert(str == "Hello world!");
Thanks.very good!
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via Digitalmars-d-learn
wrote:
> Now,I can get the string from hex string in compile time,but how to
> get it in run time?
>
> How to get it in run time?
[...]
Oh wait, I think I misunderstood your original question. Perhaps this is
closer to w
On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via Digitalmars-d-learn
wrote:
> Now,I can get the string from hex string in compile time,but how to
> get it in run time?
>
> How to get it in run time?
>
> Thanks.
import std.conv;
string hex = "900D1DEA";
uint value