INSTR - source-solutions/HELP GitHub Wiki
position = INSTR([start,] parent, chlid)
Returns the location of the first occurrence of the substring chlid
in parent
.
-
parent
andchild
are string expressions. -
start
is a numeric expression in[1 to 255]
, specifying the starting position from where to look; if not specified, the search starts at character 1.
- If
child
is not a substring ofparent
occurring at or before start,INSTR
returns0
. - If the
start
index is0
(instead of1
), it still searches from the beginning. - If
child
is empty, it is found right away at thestart
index.
-
start
has a string value or parent or child have numeric values: Type mismatch -
start
is not in[-32768 to 32767]
: Overflow. -
start
is not in[1 to 255]
: Illegal function call.