src/java/org/pifan/util/StringUtils.java
/**
     * Check whether the string starts with any of the list of prefixes to check,
     * optionally ignoring the case.
     * 
     * @param str
     * @param prefixesToCheck
     * @param ignoreCase
     * @return
     */
Check whether the string starts with any of the list of prefixes to check,
optionally ignoring the case.


Check whether the string starts with any of the list of prefixes to check optionally ignoring the case .
public static final boolean startsWith(String str, List<String> prefixesToCheck, boolean ignoreCase) {
        for (String prefixToCheck : prefixesToCheck) {
            if (ignoreCase) {
                if (str.toLowerCase().startsWith(prefixToCheck.toLowerCase())) {
                    return true;
                }
            } else {
                if (str.startsWith(prefixToCheck)) {
                    return true;
                }
            }
        }
        return false;
    }
public static final boolean startsWith ( String str , List < String > prefixesToCheck , boolean ignoreCase ) { for ( String prefixToCheck : prefixesToCheck ) { if ( ignoreCase ) { if ( str . toLowerCase ( ) . startsWith ( prefixToCheck . toLowerCase ( ) ) ) { return true ; } } else { if ( str . startsWith ( prefixToCheck ) ) { return true ; } } } return false ; }
Check whether the string starts with any of the list of prefixes to check,
 optionally ignoring the case.
Check whether the string starts with any of the list of prefixes to check optionally ignoring the case .