public static boolean contains ( final String value , final String needle , final boolean caseSensitive ) { validate ( value , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; if ( caseSensitive ) { return value . contains ( needle ) ; } return value . toLowerCase ( ) . contains ( needle . toLowerCase ( ) ) ; }
Verifies that the needle is contained in the value .