i have a long string taken from inputbox and an array/arraylist/hashset(of string) taken from file.readalllines(path)

i know can do:

function
for each word in array
if string.contain word
return true


but there is a string.contain(an element of array) ??