Radix 32+ Converter

I want to convert any base to any base.
I’m using this right now:

void setup(){

String baseConversion(String input,int fromBase,int toBase){
  return reverseCase(Integer.toString(Integer.parseInt(reverseCase(input),fromBase),toBase));

String reverseCase(String text){
  char[] chars = text.toCharArray();
  for(int i = 0; i < chars.length; i++){
    char c = chars[i];
      chars[i] = Character.toLowerCase(c);
    }else if(Character.isLowerCase(c)){
      chars[i] = Character.toUpperCase(c);
  return new String(chars);

//"PROCESSING" is too large, so I use "JAVA".

It only works for radices under 32 now (obviously, the max radix of Java is 32), how can I get it to work for radices over 32, somewhat under 62?

Number list:

//If you wants more

Interesting question!
Are you familiar with how characters are represented on the byte level? If not, look into ASCII encoding and “character algebra”
Why have that “reverse case” function?

1 Like

(My apology for the late reply. Different timeline, I suppose)

Yes, I’m familiar with ASCII and Unicode

Searching “character algebra” return me “character theory”

The reverseCase is to reverse the output letters (Java radix output lowercase letters).

I think you have all the tools, but I can’t help you anymore until you further clarify your problem.

This is just the start of the question. From here you have to start breaking it down. What information does someone else need to know to start helping you. What have you already tried. Wheres the code that is giving you problems?

1 Like

Never mind, my brain is fooling myself…
I was trying to find a converter for floating point when I am not needing it at all

1 Like