How would I detect if a string contains any member of an array of strings (words)?
Here is the array:
let str:String = "house near the beach"
let wordGroups:[String] = ["beach","waterfront","with a water view","near ocean","close to water"]
The following is not compiling
let match:Bool = wordGroups.contains(where: str.contains)
true). What error are you getting?strwill never be nil.