The includes task searches an input variable for a predefined value and returns true if the value is found, or false if it is not.
The includes task is case sensitive.
Use this task if you need to scan an email list for the word “unsubscribe” and execute a process to remove that email address from a database.
In this example:
str variable is statically set to 12 Dollars And 43 Cents.searchString is Cents.position is statically set to 19.result is false — starting at position 19, the str value reads "ents", so no complete match of Cents is found from that position onward.
In this example:
str variable is statically set to 12 Dollars And 43 Cents.searchString is cents (lowercase).position is statically set to 18.result is false — the task is case sensitive, so "cents" does not match "Cents".
In this example:
str variable is statically set to 12 Dollars And 43 Cents.searchString is Cents.position is left blank, defaulting to 0.result is true — "Cents" does appear within the str variable.