strFind Function

Searches a text string for the first occurrence of one of the specified characters.


int strFind(
    str _text, 
    str _characters, 
    int _position, 
    int _number)

Parameter

Description

_text

The text string to search.

_characters

The characters to search for.

_position

The position in the text string where the search begins.

_number

The number of characters to search, beginning at the character at _position.

If the number is negative, the system searches the number of characters backward from the specified position.

The value of the position of the first occurrence of one of the specified characters.

The strFind function is complementary to the strNFind function.

// Returns the value 4 (the position where "D" was found).
strFind("ABCDEFGHIJ","KHD",1,10);
 
// Returns the value 8 (the position where "H" was found).
strFind("ABCDEFGHIJ","KHD",10,-10);

Community Additions

ADD
Show: