PosA

Description

Temporarily converts a string from Unicode to DBCS based on the current locale, then finds one string within another string.

Syntax

PosA (string1, string2 {, start})

Argument

Description

string1

The string in which you want to find string2.

string2

The string you want to find in string1.

start (optional)

A long indicating the position in string1 where the search will begin. The position is indicated by the number of bytes you specify for this argument. The default is 1.


Return value

Long. Returns a long whose value is the starting position of the first occurrence of string2 in string1 after the position in bytes specified by start. If string2 is not found in string1 or if start is not within string1, PosA returns 0. If any argument's value is null, PosA returns null.

Usage

PosA replaces the functionality that Pos had in DBCS environments in PowerBuilder 9. In SBCS environments, Pos, PosW, and PosA return the same results.