protected static boolean containsPrefix ( final List < String > source , final String toCheck ) { if ( source != null ) { for ( final String current : source ) { if ( toCheck . startsWith ( current ) ) { return true ; } } } // The prefix was not found within the provided string toCheck. return false ; }
Checks if any element within source startsWith the provided toCheck string .