decimal to char
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, May 26, 2003 03:44 AM

hi there;


i am current convert from hex to ascii using this syntax:

			
String cr = "1b"; // carriage return
char chrcr;

chrcr = (char) Integer.parseInt(cr,16);


may i know how to change from decimal to char straight away? is that possible? wat i mean the cr instead of putting hex value, i put decimal value which is "27".


thanks in advance.

Re: decimal to char

Posted By:   Pameet_Singh  
Posted On:   Thursday, May 29, 2003 01:27 PM

String value = (new Character((char))).toString();

Re: decimal to char

Posted By:   Christopher_Schultz  
Posted On:   Monday, May 26, 2003 07:23 AM

If you don't specify a radix, then 10 (decimal) will be assumed.



-chris
About | Sitemap | Contact