Skip to main content

Character.forDigit() in MIDP/CLDC

1 reply [Last post]
davjoh
Offline
Joined: 2007-07-18
Points: 0

What's an equivalent way of doing Character.forDigit() in MIDP/CLDC?

forDigit() doesn't seem to exist, even though the opposite method, Character.digit(), is present.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
morieris
Offline
Joined: 2006-11-30
Points: 0

[code]
((digit < 10) ? '0' + digit : 'a' + digit -10)
[/code]
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Character.html#forDigit(int,%20int)