My new least favorite one-liner...

Vladimir Panteleev vladimir at thecybershadow.net
Sat Nov 5 02:23:10 PDT 2011


On Sat, 05 Nov 2011 10:29:36 +0200, Jude Young <10equals2 at gmail.com> wrote:

> icon = *(toStringz(text(num)));
>
> icon is a char, num is an integer.
> I don't suppose there is an easier way to do this?
>
> It's too late and ma brains is mushy.

If I understood the problem correctly:

icon = text(num)[0];

-- or --

icon = cast(char)('0' + num);

-- 
Best regards,
  Vladimir                            mailto:vladimir at thecybershadow.net


More information about the Digitalmars-d-learn mailing list