How to check for occurence of name in string?

Viewed 79

I have a list of names separated by space in one variable like this:

blacklist = "name1 name2 name3 etc"

What I want is to check existing of some specified name in this list. Like

if nameInBlacklist("player_name") == true then
        dosomething()
end
2 Answers
Related