liquibase-core/src/main/java/liquibase/util/StringUtil.java
public static boolean equalsIgnoreCaseAndEmpty(String s1, String s2) {
        String clean1 = trimToNull(s1);
        String clean2 = trimToNull(s2);
        if (clean1 == null && clean2 == null) {
            return true;
        } else {
            // Both cannot be null at this point
            if (clean1 == null || clean2 == null) {
                return false;
            }
        }
        return clean1.equalsIgnoreCase(clean2);
    }
public static boolean equalsIgnoreCaseAndEmpty(String s1, String s2) {
        String clean1 = trimToNull(s1);
        String clean2 = trimToNull(s2);
        if (clean1 == null && clean2 == null) {
            return true;
        } else {
            // Both cannot be null at this point
            if (clean1 == null || clean2 == null) {
                return false;
            }
        }
        return clean1.equalsIgnoreCase(clean2);
    }
public static boolean equalsIgnoreCaseAndEmpty ( String s1 , String s2 ) { String clean1 = trimToNull ( s1 ) ; String clean2 = trimToNull ( s2 ) ; if ( clean1 == null && clean2 == null ) { return true ; } else { // Both cannot be null at this point if ( clean1 == null || clean2 == null ) { return false ; } } return clean1 . equalsIgnoreCase ( clean2 ) ; }
Returns if two strings are equal, ignoring:
<ul>
<li>case (uppercase/lowercase)</li>
<li>difference between null, and empty string, and a string that only has spaces</li>
</ul>

@param s1 the first String to compare (or null)
@param s2 the second String to compare (or null)
@return true if the Strings are equal by the above criteria, false in all other cases
Returns if two strings are equal ignoring : <ul > <li > case ( uppercase / lowercase ) < / li > <li > difference between null and empty string and a string that only has spaces< / li > < / ul >