I have a character set: \, /,?,%, Etc. I also have a string, you can say: "Is this my string% is my string?"
I want to check if any of the characters are present in the string.
This is not a substring check, but a character check in a set.
I could do this:
my_str.find( "/" ) or my_str.find( "\\" ) or my_str.find( "?" )
but he is very ugly and inefficient.
Is there a better way?
source
share