beginsWith
| Syntax |
expression1 beginsWith expression2
|
| Action |
Evaluates both expressions as strings, and determines whether the result of expression1 begins with the result of expression2. If expression1 produces a list, expression2 is evaluated as a list and the comparison is done on a list basis rather than as strings.
|
| Examples |
"The quick brown fox" beginsWith "The" » true
string.lower (file.fileFromPath (f)) beginsWith "temp"
The expression would return true for files named "tempfile", "Temporary Data", "temp", etc.
The numbers are converted to strings for this operation.
This is an example of applying the beginsWith operator to a list.
The number 1 is converted to a list for this comparison. |
| Notes |
The beginsWith operator is case-sensitive; upper-case characters do not match lower-case ones.
|
| See Also |
contains
|