code: private int findNamedValue(int begin, String[] namedValues, int min)
      {
          int length = ivPos - begin;
  
          for (int i = 0; i < namedValues.length; i++)
          {
              String namedValue = namedValues[i];
  
              if (length == namedValue.length() && ivString.regionMatches(true, begin, namedValue, 0, length))
              {
                  return min + i;
              }
          }
  
          return -1;
      }
docs: Case-insensitively search the specified list of named values for a
  substring of the parse string. The substring of the parse string is the
  range [begin, ivPos).
  
  @param begin the beginning index of the substring, inclusive
  @param namedValues the values to search
  @param min the non-negative adjustment for the return value
  @return <tt>min</tt> plus the position in the values list matching the
  substring, or <tt>-1</tt> if the value was not found