Feature Rich
Rapid Application Development
Helping you or your customers
Manage their Business

All Commands All String
Commands

STRPOS

This will return the position of the second parameter within the first.
You can also supply a list of values to look for in the second parameter such as [A, B, C]. This will return the position of the first value it finds in the string. It will also place the value found in {ACT_FOUND}.

If the string is not found then it will return 0.

e.g. {STRPOS(ABCB, B)} would return 2

e.g. {STRPOS(ABCB, D)} would return 0

e.g. {STRPOS(ABCB, [C,D])} would return 3 and {ACT_FOUND} would have the value C

Add an optional offset to start the search at a specific position, 

e.g. {STRPOS(ABCB, B, 3)} would return 4

Define a negative offset to search the end characters of a string only,

e.g. {STRPOS(ABCB, B, -2)} would return 4

This command can have an {END_STRPOS} command.

In this case, the string in-between will replace the first parameter and the format will be {STRPOS} string {{END_STRPOS(parameters 2 onwards)}

This is particularly useful if the string is particularly long or contains commas.

Number Name Default Type Description
1 string String The string to be searched
3 offset 1 Expression

The start position for the search. A negative number indicates the number of characters from the end.

to add a Comment.