InStr(str, SearchForStr) : Returns the location a character (charSearchFor)
was found in the string str
========================================================================
// InStr function written by: Steve Bamelis - steve.bamelis@pandora.be
function InStr(strSearch, charSearchFor)
/*
InStr(strSearch, charSearchFor) : Returns the first location a substring (SearchForStr)
was found in the string str. (If the character is not
found, -1 is returned.)
Requires use of:
Mid function
Len function
*/
{
for (i=0; i < Len(strSearch); i++)
{
if (charSearchFor == Mid(strSearch, i, 1))
{
return i;
}
}
return -1;
}