ASCII code to char
jicman
cabrera_ at _wrc.xerox.com
Sat May 26 11:13:10 PDT 2007
Derek Parnell Wrote:
> On Sat, 26 May 2007 13:54:36 -0400, jicman wrote:
>
> > Greetings!
> >
> > say I have an integer value representing an ASCII character, how do I get that character? I was looking through Phobos, but there was no easy way of finding it and I knew you guys could help me.
> >
> > thanks,
> >
> > josé
>
> If the value is truely ASCII then it is any number from zero to 127
> inclusive. Values outside that range are not ASCII.
>
> int val;
> char c;
>
> c = cast(char)val;
Gosh... D is so easy... :-) Thanks Derek.
jic
More information about the Digitalmars-d-learn
mailing list