StrPos

combit List & Label Designer

combit List & Label

StrPos

Purpose:

Returns the position of the nth appearance of a search string. The third parameter determines which appearance will be returned. Default is 1.

The first character in the string has the position 0.

-1 as return value signifies the search string no longer appears.

Parameter:

String

String             Search string

Number         (optional)

Return value:

Number

Example:

StrPos("Normalconsumer","or")         Result: 1

StrPos("Normalconsumer","r")          Result: 2

StrPos("Normalconsumer","r",1)        Result: 2

StrPos("Normalconsumer","r",2)        Result: 13