Convert int to dchar

Paul phshaffer at gmail.com
Wed Oct 5 16:57:57 UTC 2022


    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.


More information about the Digitalmars-d-learn mailing list