See the API for String...it implements CharSequence so you can pass a String to the String.contains method