Previous Topic

Next Topic

Book Contents

Book Index

%%$POS

The %%$POS function locates a substring in a specified string, and indicates the position of the first character in the located substring.

The format of the %%$POS function is

%%$POS substring string

In this format

Note: If the substring is not found in the specified string, function %%$POS returns a value of 0.

Example 1

DO SET %%A = HAVE A NICE DAY

DO SET %%B = %%$POS NICE %%A

This returns a value of 8.

Example 2

DO SET %%A = %%$POS ABCD ABCED

This returns a value of 0.

Parent Topic

Functions