INSTR - source-solutions/HELP GitHub Wiki

INSTR


position = INSTR([start,] parent, chlid)

Returns the location of the first occurrence of the substring chlid in parent.

Parameters

  • parent and child 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.

Notes

  • If child is not a substring of parent occurring at or before start, INSTR returns 0.
  • If the start index is 0 (instead of 1), it still searches from the beginning.
  • If child is empty, it is found right away at the start index.

Errors

  • 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.
⚠️ **GitHub.com Fallback** ⚠️