private boolean match(char []a, int aOff, int aLength, char []b)
  {
    int bLength = b.length;

    if (aLength != bLength)
      return false;

    for (int i = aLength - 1; i >= 0; i--) {
      char chA = a[aOff + i];
      char chB = b[i];

      if (chA != chB && chA + 'a' - 'A' != chB) {
        return false;
      }
    }

    return true;
  }
private boolean match ( char [ ] a , int aOff , int aLength , char [ ] b ) { int bLength = b . length ; if ( aLength != bLength ) return false ; for ( int i = aLength - 1 ; i >= 0 ; i -- ) { char chA = a [ aOff + i ] ; char chB = b [ i ] ; if ( chA != chB && chA + 'a' - 'A' != chB ) { return false ; } } return true ; }
Matches case insensitively, with the second normalized to lower case.