Chat on IRC |
ASCII/unicode conversions between int and char in java
Posted by AnyoneEB [send private reply] at May 12, 2002, 07:50:39 PM
I was wondering if anyone knew how to convert an int to a char of the ASCII/unicode character that int is the number of. I know that in C and java print("\u####") prints unicode of the hex number ####. I know how to use java.lang.Integer to convert between hex and decimal. I'd assume that print("\u"+StringContainingHexNumber) would print the right unicode character, but converting back I have no idea how to do.
Posted by Psion [send private reply] at May 12, 2002, 08:37:08 PM
Can't you just use casts between int and char?
Posted by AnyoneEB [send private reply] at May 12, 2002, 09:04:36 PM
what? ummmm.... code example? Remember this is java, not C incase you missed that.
Posted by AnyoneEB [send private reply] at May 12, 2002, 09:35:02 PM
nvm, I got it, tx Psion
Register as a new user | ||||||