To read the article online, visit

InStr(str, SearchForStr) : Returns the location a character (charSearchFor)
                           was found in the string str

// InStr function written by: Steve Bamelis -

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;

Article Information
Article Title:
Article Author: Scott Mitchell
Article URL:

Copyright 2018 QuinStreet Inc. All Rights Reserved.
Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers