public static String removeRight(final String value, final String suffix, final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        validate(suffix, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        return endsWith(value, suffix, caseSensitive) ? value
                .substring(0, value.toLowerCase().lastIndexOf(suffix.toLowerCase())) : value;
    }
public static String removeRight ( final String value , final String suffix , final boolean caseSensitive ) { validate ( value , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; validate ( suffix , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; return endsWith ( value , suffix , caseSensitive ) ? value . substring ( 0 , value . toLowerCase ( ) . lastIndexOf ( suffix . toLowerCase ( ) ) ) : value ; }
Returns a new string with the 'suffix' removed, if present.

@param value         The input String
@param suffix        The suffix to remove
@param caseSensitive whether search should be case sensitive or not
@return The String without suffix!