Its just a simple function of the string class. The above statement means that if the variable my_var doesn't contains any one of the characters specified in the allowed_chars variable, it will return the index of that character.
More reference can be found here.