INSTR_POS()

INSTR_POS(S,C,P)

RETURNS THE POSITION OF STRING C IN THE STRING S FROM POSITION P

  • Type: Function
  • Parameters: 3
  • Group: Strings

ACTION

The function INSTR_POS(S,C,P) returns the position of string C in the string S,counted from position P. Returns 0 if string C is not found.

SYNTAX: Result=INSTR_POS(S,C,P)

  • S = string.
  • C = string.
  • P = real or integer value.

USE

  • The function INSTR_POS() is used to know the position of a string in another string.

ERROR

  • If S or C is not a correct string expression.
  • If P is not a correct expression.

EXAMPLE

print instr_pos("Hello everybody","every",3)

print 7

SEE ALSO

INSTR()

INSTR_LAST()

INSTR_RIGHT()