80
•
strstr(string, string2find) Returns integer
Searching Left to Right, finds string2find inside of string and returns the beginning
location of string2find.
Failure to find returns -1. Example:
string=“abcdef” string2find=“bc” = returns 1
•
strupr(string) Returns string
Returns the upper case version of a string. Example:
strupr(“test”) returns “TEST”
•
substr(String, StartChar, NumOfChars) Returns string. Example:
substr(“abcdef”,2) or substr(“abcdef”,2,0) returns “cdef”
•
Trim(string) Returns string
Remove leading and trailing spaces from string. Example:
Trim(“ test “) returns “test”
Expressions
Trigger Values for Events and Output Values for Actions may be written as expressions (instead
of constant values) by checking the “(expression)” flag. Evaluating expressions is described in
this section.
Interpreting Values as Expressions
Interpreting Values as Expressions
Interpreting Values as Expressions
Interpreting Values as Expressions
If the “(expression)” option is UNCHECKED, the trigger and output values are treated as simple strings,
and no quotation marks are needed. (NOTE: Variable Events and Actions automatically interpret the
value based on its output or input Variable’s type (see
Types of Variables
, page
77
).
On the other hand, if the “(expression)” option is CHECKED, the WACI will treat the values as an
expression and evaluate them before triggering or sending an output.
In an expression, any string values must now be in quotes; otherwise, the token will treated as an
identifier. For example:
•
“Hello”
(in quotes) is a string value in the expression.
•
Hello
(without quotes) is an identifier for a Variable.
Special characters inside string values (inside quotes) must be escaped (see
Escaping Special Characters
,
page
90
) or URL encoded (see
Send String
, page
50
).
Evaluation of Expressions
Evaluation of Expressions
Evaluation of Expressions
Evaluation of Expressions
Expressions are evaluated strictly left-to-right. Order of operations is NOT supported; however,
parentheses may be used to prioritize the execution of the expression.