strScan Function

Searches a text string for the occurrence of another string.


int strScan(
    str _text1,
    str _text2,
    int _position,
    int _number)

Parameter

Description

_text1

The text string to search.

_text2

The string to find.

_position

The position at which the search should start.

_number

The number of characters that should be searched.

If there is a minus in front of _number, the system searches the number of characters in reverse order from the specified position.

The position of the first occurrence of the substring specified by _text2.

The following example shows strScan returning two values.

// Returns the value 4 (the position of text string "DEF").
strScan("ABCDEFGHIJ","DEF",1,10);
 
// Returns the value 3 (the position of text string "CDE").
strScan ("ABCDEFGHIJ","CDE",10,-10);

Community Additions

ADD
Show: