Missing method in Apache Commons Lang StringUtils.containsAnyIgnoreCase

Just simple implementation of a missing method in StringUtils (Apache Commons Lang version 3.6).

Note: following implementation depends on org.apache.commons.lang3 version 3.0+ and requires following imports:


import org.apache.commons.lang3.ArrayUtils;

import static org.apache.commons.lang3.StringUtils.containsIgnoreCase;
import static org.apache.commons.lang3.StringUtils.isEmpty;

The method:

    public static boolean containsAnyIgnoreCase(final CharSequence cs, final CharSequence... searchCharSequences) {
        if (isEmpty(cs) || ArrayUtils.isEmpty(searchCharSequences)) {
            return false;
        }
        for (final CharSequence searchCharSequence : searchCharSequences) {
            if (containsIgnoreCase(cs, searchCharSequence)) {
                return true;
            }
        }
        return false;
    }