Test if string contains anything from an array of strings (kotlin)
You can use the filter function to leave only those keywords contained in content: val match = keywords.filter { it in content } Here match is a List<String>. If you want to get an array in the result, you can add .toTypedArray() call. in operator in the expression it in content is the same as … Read more