INSTR
- Last UpdatedDec 19, 2022
- 1 minute read
The function searches for a character expression (findWhat) within a second character expression (searchWhat) and returns the starting position of the first expression if found. If needed, you can specify the starting position (n) of the search and the occurrence number (m) of the expression to be found.
Syntax
Int32 INSTR(searchWhat AnsiString, findWhat AnsiString, n Int32, m Int32)
Int32 INSTR(searchWhat String, findWhat String, n Int32, m Int32)
Arguments
-
searchWhat
The string to search within. Must be a character string or an expression resulting in a character string.
-
findWhat
The string to search for. Must be a character string or an expression resulting in a character string.
-
n
Optional. Starting position for the search within the searchWhat string. If not specified, the search starts at the first character. Must be an integer.
-
m
Optional. The occurrence number of the expression to find. If not specified, finds the first instance. Must be an integer.