Quantcast
Channel: Test if a string contains any of the strings from an array - Stack Overflow
Viewing all articles
Browse latest Browse all 17

Test if a string contains any of the strings from an array

$
0
0

How do I test a string to see if it contains any of the strings from an array?

Instead of using

if (string.contains(item1) || string.contains(item2) || string.contains(item3))

Viewing all articles
Browse latest Browse all 17

Latest Images

Trending Articles





Latest Images