The title may be a little confusing or misleading but I'm trying to compare a single string:
String mystring = "abc";
And then try to compare it with every single string contained in an arraylist
ArrayList<String> array = new ArrayList<String>();
array.add("The first letters of the alphabet are abc");
array.add("abc");
array.add("Alphabet");
array.add("Nothing");
But (and I'm not certain) it seems that contains is true only if both strings matches and not if the word or phrase is inside the string.
How can I compare a desired string to a "phrase" that is within an ArrayList of strings?
.contains(mystring);StringUtils#containsIgnoreCasefrom Apache Commons Lang.