tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brantley Hobbs" <bho...@itos.uga.edu>
Subject RE: off topic - how do i convert an int to char
Date Tue, 07 Dec 2004 15:54:24 GMT
Wow, was I off.

Add a 97 to your int value to get the lower-case English letters.

B.

> -----Original Message-----
> From: Brantley Hobbs
> Sent: Tuesday, December 07, 2004 10:50 AM
> To: Tomcat Users List; Yang Xiao
> Subject: RE: off topic - how do i convert an int to char
> 
> Alternatively, you can add the ASCII offset to the integer, then get
the
> char that evaluates to that ASCII code.  I think its 32, but you'll
need
> to check for sure.
> 
> B.
> 
> 
> 
> > -----Original Message-----
> > From: Yang Xiao [mailto:yxiao2004@gmail.com]
> > Sent: Tuesday, December 07, 2004 10:42 AM
> > To: Tomcat Users List
> > Subject: Re: off topic - how do i convert an int to char
> >
> > make a hash or array?
> >
> >
> > On Tue, 7 Dec 2004 10:34:15 -0500, Nilesh Bhattad
> <nilesh@outlinesys.com>
> > wrote:
> > > folks,
> > > sorry for posting this offtopic qns here.. but would someone plz
> help me
> > out in converting an int value to char? my requirement is very
simple.
> i'm
> > looping thro a list and for each counter i need to get 'a', 'b' and
so
> > forth.
> > >
> > > basically i need some conversion routine which will convert 0 to
> 'a', 1
> > to 'b', 2 to 'c' and so on.
> > >
> > > again, i apologize for posting such a dumb qns.
> > >
> > > - nilesh
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message