public static Predicate<String> containsIgnoreCase(String substring) {
        return string -> {
            if (string.length() < substring.length()) {
                return false;
            }
            return string.toLowerCase(Locale.ROOT).contains(substring.toLowerCase(Locale.ROOT));
        };
    }
A collection of predicate utilities used mostly in command classes
common/src/main/java/me/lucko/luckperms/common/util/Predicates.java