SCAN

SCAN returns a number indicating the starting location of the first occurrence of a specified substring within a string. If the substring does not occur in the given string, the function returns 0.

This function is valid in both TM1® rules and TurboIntegrator processes.

Syntax

SCAN(substring, string)

Argument

Description

substring

The substring you are trying to locate.

string

The string within which you are searching for the substring.

The arguments to this function are case-sensitive. The capitalization used in the substring argument must exactly match the capitalization used in the string argument for the function to return a non-zero value.

Example

SCAN('scribe', 'described') returns 3.

However, SCAN('Scribe', 'described') returns 0, because the case in the substring argument (Scribe) does not match the case in the string argument (described).