code: public static int indexOfIgnoreCase( String text , String needle , int fromIndex )
      {
          int textLen = text.length();
          int needleLen = needle.length();
          
          if (fromIndex >= textLen) return needleLen == 0 ? textLen : -1;
          int i = fromIndex;
          if (i < 0)
          	i = 0;
          if (needleLen == 0) return i;
          
          char first = Character.toUpperCase(needle.charAt(0));
          int max = textLen - needleLen;
          
          startSearchForFirstChar:
          while (true)
          {
              // Look for first character.
              while (i <= max)
              {
                  char c = Character.toUpperCase(text.charAt(i));
                  if (c != first)
                      i++;
                  else
                      break;
              }
              if (i > max) return -1;
              
              // Found first character, now look at the rest of the string
              int j = i + 1;
              int end = j + needleLen - 1;
              int k = 1;
              while (j < end) 
              {
                  char c1 = Character.toUpperCase(text.charAt(j++));
                  char c2 = Character.toUpperCase(needle.charAt(k++));
                  if (c1 != c2) 
                  {
                      i++;
                      // Look for str's first char again.
                      continue startSearchForFirstChar;
                  }
               }
              
              return i;
          }
      }
docs: Case-insensitive version of indexOf()