POS [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
POS
The POS function returns the starting character of a string embedded in
another string. It will return 0 if the specified substring is not
found.
Syntax
POS(S1$,S2$)
Parameters
S1$ A string expression indicating the string that the
substring is to occur in.
S2$ A string expression indicating the substring. The
function returns the position of the first character of
S2$.
Examples
10 A = POS("abcde","fg") !A = 0
20 B = POS("abcde","cd") !B = 3
MPE/iX 5.0 Documentation