Compares two strings and evaluates to true if the first contains the second, false if not.Syntax:
<string> contains <substring>
Examples:
"ABC" contains "A" -- evaluates to true
"123" contains "13" -- evaluates to false
Use the contains operator to find out whether a string contains a substring.
If the substring is found in the string, the contains operation evaluates to true.
If each character of the substring can be found in the string, but the characters are separated, the contains operation evaluates to false.
Parameters:
- string (string): The string and substring are both strings of characters, or expressionsthat evaluate to strings.
- substring (string):
- Description:Use the contains operator to find out whether a string contains asubstring.
See also: = (operator),[[<>]] (operator),is in (operator),is among (operator),is not among (operator),ends with (operator),is not in (operator),