title: Algorithmically change number in String to a subscript
body: <p>Alright, I want to make a method for my Chemistry game/project where it would:</p>
  
  <ul>
  <li>take a String</li>
  <li>then it would take the String, check for numbers, and if there are numbers, turn it into a subscript of that same number.</li>
  <li>return the updated String</li>
  </ul>
  
  <p>My original thoughts was to turn the string into a char array, then make a for loop where I  try Integer.parseInt(Character.toString(char array element)), and if it threw a NumberFormatException it would continue the for loop. If it didn't throw an error, then I retain that number, add it to 2080 (because \u2080 -> \u2089 are the subscript unicodes) and then somehow smush that number back into a char.</p>
  
  <p>I tried to write the code for it, but wasn't sure how to proceed.</p>
  
  <pre><code>private String processName(String original)
      {
          char[] or = original.toCharArray();
  
          int returned = 0;
  
          for(char character : or)
          {
              try
              {
                  returned = Integer.parseInt(Character.toString(character));
              }
  
              catch (Exception e)
              {
                  continue;
              }
  
              if(returned != 0)
              {
                  returned += 2080;
  
                  String temp = "\\u" + returned;
  
                  //gave up here
              }
          }
  
      }
  </code></pre>