7.9.9 FIND
Function
FIND is called a string search function. It searches for the position of string IN2 in the current string IN1, and OUT outputs the position of the first string searched
LD graphics
Parameter description
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| IN1 | Input | STRING | String |
| IN2 | Input | STRING | String |
| Function name | Return value | INT | String position |
Corresponding syntax
- IN1: current string
- IN2: Search string
- OUT: the first position of the character
Example
- LD sample animation is as follows:

- ST example is shown in the following code:
OUT:=FIND(IN1:=IN1,IN2:=IN2);