This function determines if the substring appears in the string. It returns the location of the first instance of substring in string. If substring is not in string, it returns 0.
start is an int after which the command should check. If substring is in string before the indicated location, this will ignore that instance.
In the catalog
- Position in String
:Prompt Str1,Str2 :0→S :0→N : :While inString(Str1,Str2,S) :inString(Str1,Str2,S)+1→S :N+1→N :End : :Disp "Str2 IN Str1",N,"TIMES"
This prompts the user for two strings, then returns the number of times the second string appears in the first string.