Skip to main content
Version: 18

STRFIND

Finds a string within another string.

Description

Finds a string within another string. If the String to find exists within the String to search, then the character number of the first find (starting from 0) will be stored in the output variable. If the String to find does not exists within the String to search then the output value will be "-1".

Syntax

STRFIND [String to search] [String to find] [Output variable]

Command parameters

Command parameterAssignmentValue formatInput options
String to searchRequiredStringLocal, variable
String to findRequiredStringLocal, variable
Output variableRequiredStringLocal, variable

The string that will be searched.

String to find:

The string that will be searched for within the first string.

Output variable:

The variable that will store the output.

Sample code

STRFIND asd123 12 Output_Variable