reference:evaluator:instr

InStr(
     string:string,
     string:search,
     [int:start],
     [string:flags]
)
int

Arguments

string

String to search.

search

String to search for.

start

Optional. Position to begin search at. If not specified the entire string is searched, otherwise:
  • When searching forward, any match must start at or after start
  • When searching backward, any match must start (not end) at or before start

flags

Optional. The optional flags are:
cConsider case when performing the search (case-sensitive)
rReverse search for the last match instead of the first
iIgnore diacritics
wOnly match whole words
sOnly match exactly at the specified start position

Return value

Position of the match, or -1 for no match.

Description

Returns the position that search was found within string, or -1 if not found.

Example:

Output(InStr("The quick brown fox", "quick"))
--> 4

See also:
Count