public boolean matches(String expected){
  skipWhitespace();
  for (int i=0; i < expected.length(); i++) {
    if (i + n >= s.length())     return false;
    if (Character.toUpperCase(s.charAt(i + n)) != Character.toUpperCase(expected.charAt(i)))     return false;
  }
  n+=expected.length();
  return true;
}

public boolean matches ( String expected ) { skipWhitespace ( ) ; for ( int i = 0 ; i < expected . length ( ) ; i ++ ) { if ( i + n >= s . length ( ) ) return false ; if ( Character . toUpperCase ( s . charAt ( i + n ) ) != Character . toUpperCase ( expected . charAt ( i ) ) ) return false ; } n += expected . length ( ) ; return true ; }
if the input matches this string ( case insensitive ) then advance to the end of this prefix and return ' true ' .
