contains
| Syntax |
expression1 contains expression2
|
| Action |
Evaluates both expressions as strings, and determines whether the result of expression1 contains the result of expression2. If expression1 produces a list or record, expression2 is evaluated as a list or record and the comparison is done on that basis rather than as strings.
|
| Examples |
"The quick brown fox" contains "quick" » true
string.dateString () contains "Fri"
Thank God it's Friday!
The numbers are converted to strings for this operation.
The number 3 is converted to a list, and the comparison results in true.
The first list contains the numbers 2 and 4, but not the list {2, 4} in sequence.
See Notes. |
| Notes |
The contains operator is case-sensitive; upper-case characters do not match lower-case ones. When applied to record values, the contains operator is not order-sensitive. It results in a true value as long as each item in the second record is contained in the first record and has the same value.
|
| See Also |
beginsWith
|