On Wednesday, 5 October 2022 at 17:16:29 UTC, H. S. Teoh wrote:
For the former:
dchar ch = '0' + intValue;
This! Thanks Teoh.
Thanks Steve. I need to covert something like this:
int myvar = 5;
How would I convert myvar to a dchar?
On Wed, Oct 05, 2022 at 04:57:57PM +, Paul via Digitalmars-d-learn 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);
>
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,
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);