Converting int to dchar?
Darren via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 31 14:31:52 PDT 2016
Hey, all.
I'm pretty much a programming novice, so I hope you can bear with
me. Does anyone know how I can change an int into a char
equivalent?
e.g.
int i = 5;
dchar value;
?????
assert(value == '5');
If I try and cast it to dchar, I get messed up output, and I'm
not sure how to use toChars (if that can accomplish this).
I can copy+paste the little exercise I'm working on if that helps?
Thanks in advance!
More information about the Digitalmars-d-learn
mailing list