Convert int to dchar
Steven Schveighoffer
schveiguy at gmail.com
Wed Oct 5 17:08:19 UTC 2022
On 10/5/22 12:57 PM, Paul wrote:
> I'm sure I'm making this more difficult than it needs to be. I'm
> trying to convert an integer to a dchar. The solution below works but
> seems like overkill.
>
> dstring dstrValue = to!dstring(5);
> dchar dcharValue = to!dchar(dstrValue);
>
> ... this,
>
> dchar dcharValue = to!dchar(5);
>
> ... writes out '\x005' ..or something close to that.
dchar dstrValue = '5';
-Steve
More information about the Digitalmars-d-learn
mailing list