code: private static int getPairIndex(int ch)
      {
          int probe = pairedCharPower;
          int index = 0;
  
          if (ch >= pairedChars[pairedCharExtra]) {
              index = pairedCharExtra;
          }
  
          while (probe > (1 << 0)) {
              probe >>= 1;
  
              if (ch >= pairedChars[index + probe]) {
                  index += probe;
              }
          }
  
          if (pairedChars[index] != ch) {
              index = -1;
          }
  
          return index;
      }
docs: Search the pairedChars array for the given character.
  
  @param ch the character for which to search.
  @return the index of the character in the table, or -1 if it's not there.