At

Locates the starting character position of a string within another string.

Syntax

At(s1, s2)

Parameters

Parameter

Description

s1

The source string.

s2

The search string.

If s2 is not a part of s1, the function returns 0.

If s2 is empty, the function returns 1.

Examples

The following expressions are examples that use the At function:

Expression

Returns

At("ABCDEFGH", "AB")

1

At("ABCDEFGH", "F")

6

At(23412931298471, 29)

5, the first occurrence of 29 within the source string.

At(Ltrim(Cust_Info[0]), "555")

The location of the string 555 within the first occurrence of Cust_Info.

See also Ltrim.

// Ethnio survey code removed