3.5.7.10 FindOneOf

Description

This function searches string find$ for the first character that is found in string within$, and returns the 1-base index of the first found character in within$. This function is case sensitive, and does not allow wildcard characters.

Syntax

int FindOneOf(string within$, string find$)

Parameters

within$

is the containing string.

find$

is the string you want to find.

Return

Return the 1-based index of the first found character if matched character has been found, otherwise return 0.

Examples

string str$="abcdef";
string str2$="xd";
position = FindOneOf(str$, str2$);
position =; //should print out 4 as 'd' is first match
position = FindOneOf(str$,"xyz");
position =; // should print 0

See Also

Search, MatchBegin, MatchEnd, Find, GetToken