strNFind Function

Searches a portion of a text string for the first occurrence of a character that is not included in a specified list of characters.


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

Parameter

Description

_text

The text string to search.

_characters

The list of characters to exclude from the search.

_position

The position in the string that the search should start at.

_number

The number of characters to search.

If there is a minus sign preceding _number, the system searches _number characters in reverse order from _position.

The position of the first occurrence of a character not contained in _characters.

The strNFind function is complementary to the strFind function.

// Returns the value 5 (the position of "E").
strNFind("ABCDEFGHIJ","ABCDHIJ",1,10);
 
// Returns the value 6 (the position of "H").
strNFind("CDEFGHIJ","CDEFGIJ",10,-10);

Community Additions

ADD
Show: