public int compareToIgnoreCase(String string){
  int o1=offset, o2=string.offset, result;
  int end=offset + (count < string.count ? count : string.count);
  char c1, c2;
  char[] target=string.value;
  while (o1 < end) {
    if ((c1=value[o1++]) == (c2=target[o2++])) {
      continue;
    }
    c1=Character.toLowerCase(Character.toUpperCase(c1));
    c2=Character.toLowerCase(Character.toUpperCase(c2));
    if ((result=c1 - c2) != 0) {
      return result;
    }
  }
  return count - string.count;
}

public int compareToIgnoreCase ( String string ) { int o1 = offset , o2 = string . offset , result ; int end = offset + ( count < string . count ? count : string . count ) ; char c1 , c2 ; char [ ] target = string . value ; while ( o1 < end ) { if ( ( c1 = value [ o1 ++ ] ) == ( c2 = target [ o2 ++ ] ) ) { continue ; } c1 = Character . toLowerCase ( Character . toUpperCase ( c1 ) ) ; c2 = Character . toLowerCase ( Character . toUpperCase ( c2 ) ) ; if ( ( result = c1 - c2 ) != 0 ) { return result ; } } return count - string . count ; }
compare the receiver to the specified string to determine the relative ordering when the case of the characters is ignored .
