jetbrick-commons/src/main/java/jetbrick/lang/StringUtils.java
private static boolean endsWith(final String s, final String suffix, final boolean ignoreCase) {
        if (s == null || suffix == null) {
            return s == null && suffix == null;
        }
        if (suffix.length() > s.length()) {
            return false;
        }
        final int strOffset = s.length() - suffix.length();
        return s.toString().regionMatches(ignoreCase, strOffset, suffix.toString(), 0, suffix.length());
    }
private static boolean endsWith(final String s, final String suffix, final boolean ignoreCase) {
        if (s == null || suffix == null) {
            return s == null && suffix == null;
        }
        if (suffix.length() > s.length()) {
            return false;
        }
        final int strOffset = s.length() - suffix.length();
        return s.toString().regionMatches(ignoreCase, strOffset, suffix.toString(), 0, suffix.length());
    }
private static boolean endsWith ( final String s , final String suffix , final boolean ignoreCase ) { if ( s == null || suffix == null ) { return s == null && suffix == null ; } if ( suffix . length ( ) > s . length ( ) ) { return false ; } final int strOffset = s . length ( ) - suffix . length ( ) ; return s . toString ( ) . regionMatches ( ignoreCase , strOffset , suffix . toString ( ) , 0 , suffix . length ( ) ) ; }
<p>
Check if a String ends with a specified suffix (optionally case
insensitive).
</p>

@see java.lang.String#endsWith(String)
<p > Check if a String ends with a specified suffix ( optionally case insensitive ) . < / p >