I would like to convert a text string to an integer. Is there a way that I can do this in Mathematica without manually typing the polynomial function for each of the string’s characters? I know that there is the BaseForm function; however, that is limited to bases between 2 and 36. For what I have, I need arbitrary values. I have 4 structures to convert strings to decimal numbers. One converts the strings from bases that are powers of 2. The remaining 3 convert the string from arbitrary bases up to 16,777,216. I figured out how to start with an arbitrary base that is determined by the highest character code in the string. What I don’t know how to do is use the raw string as input and have it converted to decimal in place of the string’s polynomial function. Is there a way that I can replace string polynomials with the raw strings, while retaining my intended functionality? I have attached a notebook to showcase what I am currently doing and would like to do in a more efficient manner.
Calculator.nb (1.91 MB)