InStr(haystack:Str, needle:Str):Str

Find substring. Locates the first occurrence of needle in haystack. It returns the position of that string as an integer, where 1 means the first position. If there is no match, returns 0.

Note that, by default, substring search is case-insensitive. Use StrCase to search case-sensitive.

Examples:

  InStr("frob","o") = 3
  InStr("frob","x") = 0

If any parameter is EMPTY, this function returns EMPTY.

See also: Elementary Functions