I am using
i = value.toBigInteger()
i.toString(32).toUpperCase()
to convert a 16 digit ‘number’ to characters for use in a serial
Is there any way to force this to use the A-Z + 2-7 notation rather than 0-9 + A-V??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One option would be to re-implement the way
BigInteger.toString( radix )works (with Java 7, it callsjava.math.Conversion.bigInteger2Stringwhich can be found here — and as you can see, would be a large amount of work)Another would be to use Groovy 1.7.3 and the new tr function to simply replace the chars in your string with those you want instead: