public static boolean endsWithIgnoreCase ( final String base , final String end ) { if ( base . length ( ) < end . length ( ) ) { return false ; } return base . regionMatches ( true , base . length ( ) - end . length ( ) , end , 0 , end . length ( ) ) ; }
Helper functions to query a strings end portion . The comparison is case insensitive .