FindText("'Text1'", "'Text2'", ' CaseSensitive=1*')

Arguments

'Text1'

Specification of the first comparison text

'Text2'

Specification of the second comparison text

'CaseSensitive*'

Optional parameter (default = 1) for determining whether a case sensitive comparison (consideration of upper and lower case) should be made

'CaseSensitive' <> 0

Take upper and lower case into account

'CaseSensitive' = 0

Ignore upper and lower case

Parameters ending with * are only evaluated once at the start of the acquisition.

Description

This function checks whether 'Text2' is contained in 'Text1' and returns the index as a result (position in 'Text1, first character = index 0) where 'Text2' was found for the first time. Blanks are considered in the search. With the optional parameter 'CaseSensitive=1', it can be determined whether upper and lower case should be considered (=1 or not specified), or not (<>1).

Dynamic text can be used by selecting a text signal. A text signal is set in square brackets []. It is also possible to enter constant text by just typing the text between the double quotes.

The function returns an analog value as the result.

Results

-1

if the second text is not included in the first text

0....n

Position where 'Text2' is in 'Text1' the first time

Example

The following table shows a couple of examples:

Text1

Text2

Result

Comment

FindText ("Text1","Text2",0)

FindText ("Text1","Text2",1)

The Sun is shining.

-1

4

4

The moon is shining

-1

-1

-1

The sun is shining

-1

4

-1