The string find activity can be used to find the length or position of a sub string in a string
Activity properties
begin var StringLength: Integer; StringLength := StringToFind.Length; end; |
Resulting Code
String length
String length simply returns the length of the given string with the .length string helper
Finding the index of a substring
There are two options in finding a substring, the first or the last index of.
Both options have the following parameters:
- String to find
- Initial offset
- The length of the substring.
The initial offset is the position of the start of the search. If left empty, the search will start at the beginning of the string.
The length of the substring determines how many chars needs to be searched as a maximum. If left empty, the search will go to the end of the string.