We can use the CHARINDEX() function to check whether a String contains a Substring in it. Name of this function is little confusing as name sounds something to do with character, but it basically returns the starting position of matched Substring in the main String.
Read moreHow do you check if a string contains a substring in HTML?
The includes() method returns true if a string contains a specified string. Otherwise it returns false .
Read moreHow do I check if a string contains a substring in Python?
Using the ‘in’ operator : The in operator is the easiest and pythonic way to check if a python string contains a substring. The in and not in are membership operators, they take in two arguments and evaluate if one is a member of the other. They return a boolean value.
Read more