findString
Syntax: findString(String, StringToFind)
Arguments:
- String is the string to search within.
- StringToFind is a string to find within String.
Return Type: Integer. Returns 0 if StringToFind is not found in String.
Description: Looks for StringToFind in String, and returns the position of the first occurrence of the StringToFind. The offset value starts at 1, i.e., 1 is the first character in String.
Match_String_Trim is similar to findString. The differences are that findString is always case-sensitive and does not trim trailing spaces off of the argument values.
Example:
if findString(CRTRAN25.merchantId, “tunes”) <> 0
and CRTRAN25.transactionAmount < 5
//Checks to see if the merchant name has tunes in the name and the txn is less than $5.
then SRVC_UDV_iTunesDTTM = DateTimeConvert(CRTRAN25.transactionDate, CRTRAN25.transactionTime);
//if it does, collect the date and time of the transaction for use in a decision rule.
In the example, you can see that quotes are required around a string but not around a data feed element.