strFind


strFind Integer

strFind (String input, String findstring)

Performs a case-sensitive search in the input string for findstring. The index in the input string where findstring is returned if found; -1 if findstring is not found.

Parameters:

input

string to examine

findstring

string to look for

Returns:

Integer containing the index where findstring was found. -1 is returned if findstring is not found.

Related topic

Example:

str = "This is an example string"

idx1 = strFind(str, "example")

// idx1 is 8

idx2 = strFind(str, "not there")

// idx2 is -1

Example:

//

// Trigger on the string "IEE136I" (the message id for the "D T" output)

// anywhere in the string

// trigger on strFind(message.TEXT, "IEE136I") >= 0 //

// Rest of the rule follows.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*