Command string.find

The command string.find is used to return the position of a substring in a string.

Parameters

  1. start [string]
    Set the search starting point.
  2. string [string]
    Define the string to be searched.
  3. substring [string]
    Define the text to be found.
  4. variablereturn [string]
    Variable that will store the result of the command
    • -1: Text not found
    • >-1: position of the found text

Example


In the example above the command string.find will search for text Walk in the variable sText, starting the search at position 0. The return is saved in the variable iElement.

The variable iElement is converted to stringvariable to be displayed on the display.